Find and Replce

Q

Question Boy

Hello,

I am using the following

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

which open the find and replace dialog.

Is there a way to set the 'Look In:' & 'Match:' values from vba? If not,
are there any alternatives?

Thank you,

QB
 
M

Manuel

I'd be interested in finding out if there's a way to turn off the "Replace"
feature when calling Find and Replace in this manner.
 
J

John W. Vinson

Hello,

I am using the following

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

which open the find and replace dialog.

Is there a way to set the 'Look In:' & 'Match:' values from vba? If not,
are there any alternatives?

Thank you,

QB

That is ANCIENT, hard to read, and inefficient code. Yes, I know, the wizards
still use it... but the wizards are ancient, inept, and inefficient!

If you want to dynamically update records in a table - *use an Update query*
with parameters. For example,

strSQL = "UPDATE mytable SET thisfield = [Forms]![MyForm]![txtNewValue] WHERE
thatfield = [Forms]![MyForm]![txtOldValue];"

with appropriate form design and query execution.
 

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