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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |