Automating Processes using Forms

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I was wondering if it was possible, using a form, to open up another form and
have it automatically pop-up the Ctrl+F feature.

And if possible, how?
 
Yes it is.
Use the Form's Load event. First you want to set the focus to the control
you want to use in the Find because the Find dialog will open with that
control autmatically selected. So the sequence is:

Me.txtSomeControl.SetFocus
Docmd.RunCommand acCmdFind
 
The DoMenuItem command is obsolete. Help will tell you it is only there for
backward compatibility. You should use the RunCommand going forward.

It is also much easier to understand what the code is actually doing.
 
Back
Top