How get rid of 'Replace' tab in 'Find & Replace' window

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 

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

Back
Top