convert 97 to 2000 find command error

K

keith

I converted a 97 to 2000, no errors. But the command
buttton I had to find s record gives me an error. "The
macro attempting to search can't be searched" Try one of
the following: Add a GoToControl Action before find
record action, or for the find record action change the
Only Current field action to No, or Change the focus to a
searchable control. ? ?

The code I am using is (watch for wordwrap):


Private Sub Look_Up_Command_Click()
On Error GoTo Look_Up_Command_Click_Err

' %e = "Search Only Current Field" set to no ; %ha
= "Any Part of Field" ; %n = Set Cusor at first field
SendKeys "%e%ha%n", False

' with form open, go to Menu Bar and open Edit, then
Execute the Find window
DoCmd.DoMenuItem 0, 1, 10, 0, acMenuVer70 ' Form,
Edit, Find...


Look_Up_Command_Click_Exit:
Exit Sub

Look_Up_Command_Click_Err:
MsgBox Error$
Resume Look_Up_Command_Click_Exit

End Sub

The %e should be set to No
The %n should be to set cursor to first field

What am I missing?

Thank you in advance for your help

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top