Find and replace default settings (1 Viewer)

Robert C

Registered User.
Local time
Today, 04:42
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!!
 

nateobot

Registered User.
Local time
Yesterday, 22:42
Joined
Dec 13, 2005
Messages
86
Tools | Options
Click on Edit/Find tab.

There is a section called Default find/replace behavior.

Click the General search radio button.
 

ghudson

Registered User.
Local time
Yesterday, 23:42
Joined
Jun 8, 2002
Messages
6,194
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.
 

Robert C

Registered User.
Local time
Today, 04:42
Joined
Mar 27, 2000
Messages
88
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
 

nateobot

Registered User.
Local time
Yesterday, 22:42
Joined
Dec 13, 2005
Messages
86
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
 

Robert C

Registered User.
Local time
Today, 04:42
Joined
Mar 27, 2000
Messages
88
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

Top Bottom