Find and Replace dialog

M

mike

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
 

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

Top