Find and Replace dialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I'm trying to figure out how to set the options for the find and replace
dialog box. I have a form with a command button that opens the dialog box,
but the original developer used a series of SendKeys commands to set the
various options for the Find. This is buggy -- occasionally my laptop stops
recognizing my keyboard -- and I wanted to develop a more elegant solution.

After setting the focus in the correct field and opening the find dialog
box, I want it to default to to match any part of the field, and for the
cursor to be placed in the Find What textbox. Is there a way to
programmatically do this without SendKeys?


Here's the code:

Me.Advertiser_Name.SetFocus
DoCmd.RunCommand acCmdFind
SendKeys "%h", False
SendKeys "a", False
SendKeys "%n", False
 
Back
Top