A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find Command



 
 
Thread Tools Display Modes
  #1  
Old June 23rd, 2004, 07:05 PM
John Kozma
external usenet poster
 
Posts: n/a
Default Find Command

I have a form to which I've added a command button that executes the Find...
command from the Edit menu on the Form menu bar, viz.,

Private Sub FindRecords_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, 9
'Application.RunCommand acCmdFind
End Sub

The command allows the selected control or the entire form to be searched.
Searching the selected control seems to work okay. (I added code to change
the focus back to the previously selected control so that the command
behaves the same way from the button as it does from the menu.) However,
the search does not always work correctly when I search the whole form. In
particular, the command would only locate the "Find What:" entry in the
current record, and would not display the "...not found." message when no
further instances were found. At first I thought the problem was the OS,
because I first noticed it on two different machines running Windows ME, but
not on the XP machine I regurlarly use. On one of the ME machines, running
the Find... command and searching the entire form also seemed to interfere
with the print command. I tried changing to the RunCommand method call
commented out above (from the call to the DoMenuItem method of the DoCmd
object. The db was created in Access 2000.) To the best of my
recollection, the same errant behavior of the Find... command resulted on my
XP machine that I had observed on the ME machine. Before posting this, I
tried to run the command both ways again so I could describe the behavior
more precisely. Now, however, both calls seem to work fine on XP. I have
not been able to try the RunCommand call on the ME machine.

Any suggestions about what might be causing the Find... command to
misbehave?

Thanks,
John Kozma


  #2  
Old June 23rd, 2004, 07:47 PM
Joe
external usenet poster
 
Posts: n/a
Default Find Command

I'm not sure that I can help you with your question but I
was wondering if you could help me with mine. I have a
database right now that has two columns to it: a new item
and the old item column. I would like to have a find
command that would allow me to search just one column and
have the findings be entered into the fields of one column
and vice versa. Right now, when I hit the find record
command button to search it updates both columns because
the field names are the same. Is it possible for the
search to be restricted to just one side of the form and
not search the second column? I just want to limit the
search if there is such a way and not update both columns.



-----Original Message-----
I have a form to which I've added a command button that

executes the Find...
command from the Edit menu on the Form menu bar, viz.,

Private Sub FindRecords_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, 9
'Application.RunCommand acCmdFind
End Sub

The command allows the selected control or the entire

form to be searched.
Searching the selected control seems to work okay. (I

added code to change
the focus back to the previously selected control so that

the command
behaves the same way from the button as it does from the

menu.) However,
the search does not always work correctly when I search

the whole form. In
particular, the command would only locate the "Find

What:" entry in the
current record, and would not display the "...not found."

message when no
further instances were found. At first I thought the

problem was the OS,
because I first noticed it on two different machines

running Windows ME, but
not on the XP machine I regurlarly use. On one of the ME

machines, running
the Find... command and searching the entire form also

seemed to interfere
with the print command. I tried changing to the

RunCommand method call
commented out above (from the call to the DoMenuItem

method of the DoCmd
object. The db was created in Access 2000.) To the

best of my
recollection, the same errant behavior of the Find...

command resulted on my
XP machine that I had observed on the ME machine. Before

posting this, I
tried to run the command both ways again so I could

describe the behavior
more precisely. Now, however, both calls seem to work

fine on XP. I have
not been able to try the RunCommand call on the ME

machine.

Any suggestions about what might be causing the Find...

command to
misbehave?

Thanks,
John Kozma


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find command Suze New Users 2 June 17th, 2004 06:32 AM
Outlook Find Stops Working MrRadish General Discussion 1 June 16th, 2004 09:55 AM
find command JB Setting Up & Running Reports 1 June 7th, 2004 10:41 PM
Insert Syntax question for field names in the value portion of the command. Matthew Ferri New Users 1 June 7th, 2004 02:14 PM
Find Wont Find Value Joe Gieder Worksheet Functions 1 November 10th, 2003 09:17 PM


All times are GMT +1. The time now is 03:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.