search on disabled control

arage

Registered User.
Local time
Today, 16:49
Joined
Dec 30, 2000
Messages
537
Hi,
The code below was generated by access when I put a find record button on my form but the button is no good to me, b/c its using the using the wrong control. I want someone to enter a ref#, and then search records based on a non-enabled field on my form (coming from my query) but I’m not sure how to set the focus to the event to search against that field since access doesn’t allow searching against a non enabled control.

Private Sub Command133_Click()

On Error GoTo Err_Command133_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Command133_Click:
Exit Sub

Err_Command133_Click:
MsgBox Err.Description
Resume Exit_Command133_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom