Greetings,
I have a form with numerous fields that I am wanting to use the "Find" command on. What I am wanting to do is use a command button on the form labeled "Search". Whenever the user presses the Search button, I would like the "Find" command to be executed for whatever field the cursor is currently in. For instance, if the cursor is resting in the "First Name" field, then when the user presses the "Search" button I would like the "Find and Replace" dialog to appear so that they can't enter in a first name to search for. I realize that there is the "Find and Replace" toolbar button that I can use, but I haven't figured out how to use this with a command button. I have tried to the following "DoCmd" line of code, but to no avail. Any suggestions?
Call DoCmd.DoMenuItem(acFormBar, acEditMenu, acFindRecord, , acMenuVer70)
--
Thanks in advance!
Sherwood
I have a form with numerous fields that I am wanting to use the "Find" command on. What I am wanting to do is use a command button on the form labeled "Search". Whenever the user presses the Search button, I would like the "Find" command to be executed for whatever field the cursor is currently in. For instance, if the cursor is resting in the "First Name" field, then when the user presses the "Search" button I would like the "Find and Replace" dialog to appear so that they can't enter in a first name to search for. I realize that there is the "Find and Replace" toolbar button that I can use, but I haven't figured out how to use this with a command button. I have tried to the following "DoCmd" line of code, but to no avail. Any suggestions?
Call DoCmd.DoMenuItem(acFormBar, acEditMenu, acFindRecord, , acMenuVer70)
--
Thanks in advance!
Sherwood