Find Record Problem

denileigh

Registered User.
Local time
Today, 00:01
Joined
Dec 9, 2003
Messages
212
Hello,

I have a large database I set up and we have been using fine for a couple of years now.

All of the sudden, anytime Find Record is clicked and the value is entered, I am getting the following error, on ALL forms. Nothing has been changed in the DB itself and it worked GREAT before.

The control 'Command 138' the macro is attempting to search can't be searched.

Try one of the following:
* Add a GoToControl before the FindRecord action.
* For the FindRecord action, change the Only Current Field action argument from yes to no.
* Change the focus to a searchable control.


Can anyone help? It is VERY frusterating and I can't figure it out.

Thanks so much! ;)
 
denileigh,

Since the forms (and the DB) have been in use for years, have you tried a
Compact/Repair?

Wayne
 
Sure did...first thing. Didn't change anything.
 
Can you post the code behind the 'Command 138' button. My feeling is that this control might be missing.
 
I have exactly the same problem, except that it started after coverting from Access 97 to Access 2000. It still works fine when its run in 97.

This is the code behind the "Find Record" button (command 434). It's the same in both 97 and 2000.

Private Sub FIND_RECORD_Click()
On Error GoTo Err_FIND_RECORD_Click

Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70


Exit_FIND_RECORD_Click:
Exit Sub

Err_FIND_RECORD_Click:
MsgBox Err.Description
Resume Exit_FIND_RECORD_Click

End Sub
 
Last edited:
I also have this same error when I add exactly the same code to one of my forms. However the same code works on other forms in my database. Can't fathom out why it works on some and not others. The forms were originally created in an older format and converted to 2000, but adding adding another button with the same code on these forms still works so I was thinking it was something to do with the particular form I was working on that was causing the problem?

If anyone knows the cause and solution I'd be very grateful!
 

Users who are viewing this thread

Back
Top Bottom