Find and replace default settings

Robert C

Registered User.
Local time
Today, 21:45
Joined
Mar 27, 2000
Messages
88
Is there any way to change the default settings on the Find and Replace dialog from 'Whole field' to 'Any part of field'?

Thanks very much in advance.

Rob

PS Happy Christmas!!
 
Tools | Options
Click on Edit/Find tab.

There is a section called Default find/replace behavior.

Click the General search radio button.
 
You can use code to do it with the Application.SetOption method. Search the Access VBA help files for the "Set Options from Visual Basic" options and you will find the one for the Default find/replace behavior.
 
Hi nateobot

Thanks, that works to a certain extent, but it also changes the default in the 'Look in' field as well as the 'Match' field.

I want to look in only one field - as defined by a SetFocus code in the on click event of the button.

Cheers

Rob
 
Robert C said:
Hi nateobot

Thanks, that works to a certain extent, but it also changes the default in the 'Look in' field as well as the 'Match' field.

I want to look in only one field - as defined by a SetFocus code in the on click event of the button.

Cheers

Rob

Didn't know that you wanted that extra 'functionality' based on your initial question.

Can you set the focus to the textbox before calling the Find dialog?

Something like:

Code:
Me.TextBox1.SetFocus
DoCmd.RunCommand acCmdFind
 
Hi Nateobot

No, the global Tools/Options settings seem to override any SetFocus commands in the code behind the button.

I'll see if I can figure out ghudson's suggestion - not quite sure where these SetOption expressions go however!!!

Thanks again

Rob
 

Users who are viewing this thread

Back
Top Bottom