ACC2: Find Record Wizard Command Button Has Options DisabledID: Q126866
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you choose a Find Record command button that you created with the
Command Button Wizard, the Search In option buttons and the Search Fields
As Formatted check box are unavailable in the Find dialog box.
When you choose the command button, the command button receives the focus. The Search In option buttons and the Search Fields As Formatted check box are available only when the Find dialog box is invoked from a text box that is based on a field.
Add the following line to the code that is generated by the Command Button
Wizard so that the focus is returned to the control that had the focus
before you chose the command button:
Screen.PreviousControl.SetFocus
Screen.PreviousControl.SetFocus
Sub ButtonX_Click ()
Screen.PreviousControl.SetFocus
On Error GoTo Err_ButtonX_Click
DoCmd DoMenuItem A_FORMBAR, A_EDITMENU, 10, , A_MENU_VER20
Exit_ButtonX_Click:
Exit Sub
Err_ButtonX_Click:
MsgBox Error$
Resume Exit_ButtonX_Click
End Sub
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.
Keywords : kbusage WzProb
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 9, 1999