Is there a way to suppress the Replace tab in the Find and Replace window?
M mscertified May 9, 2006 #1 Is there a way to suppress the Replace tab in the Find and Replace window?
M mscertified May 9, 2006 #2 This seems to work ok: Private Sub butFind_Click() On Error GoTo ER Screen.PreviousControl.SetFocus Me.AllowEdits = False 'Suppress REPLACE tab DoCmd.RunCommand acCmdFind Me.AllowEdits = True 'Restore state Exit Sub ER: Me.AllowEdits = True MsgBox Err.Description End Sub
This seems to work ok: Private Sub butFind_Click() On Error GoTo ER Screen.PreviousControl.SetFocus Me.AllowEdits = False 'Suppress REPLACE tab DoCmd.RunCommand acCmdFind Me.AllowEdits = True 'Restore state Exit Sub ER: Me.AllowEdits = True MsgBox Err.Description End Sub
A Allen Browne May 10, 2006 #3 That's not a bad workaround. Check that any edits are saved before you do this, e.g. add the line: If Me.Dirty Then Me.Dirty = False immediately before you turn off AllowEdits.
That's not a bad workaround. Check that any edits are saved before you do this, e.g. add the line: If Me.Dirty Then Me.Dirty = False immediately before you turn off AllowEdits.