First I copied an ID number from a spreadsheet in Excel and moved to Access. Then I run this code from a key to set the focus in the ID field and open the find box.
<font color=blue>Me!Acc.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70 </font color=blue>
Now I want to paste the ID# which is in the clipboard into the find box. Maually I would just hit ^V. Can't seem to find the right combination. Neither of the following work:
<font color=blue>DoCmd.RunCommand acCmdPaste
DoCmd.DoMenuItem acFormBar, acEditMenu, 3, , acMenuVer70</font color=blue>
Both return an error message "The type of object the action applies to isnt currently selected or isnt in the active view." I suppose that means you cant run a menu command in a find dialog box.
So what is the code equivalent to <font color=red> ^V </font color=red>
All of the "goto" and "search for" codes want me to specify the search criteria in advance. But I want to search for something new everytime.



