Find and Replace Macro

ndello

Active Member
Joined
Oct 16, 2002
Messages
382
Hi,
I created a form and then put a search button on the form. How can i set the search button Match Case to be Any part of field instead of it always stating at Whole Field?

Thanks
Here is the macro of the button:
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Command36_Click:
Exit Sub

Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click

End Sub
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Read this extract, you haven't stated which version of access you are using.

Select the Tools -> Options menu to open the "Options" dialog window.
Select the "Edit/Find" tab. Select the "General Search" option button at
the top left of the window, then the "OK" button to close the window.
Access will continue to use your current setting that you've already
manually applied in the "Find And Replace" window (whether it's "Any Part of
Field," "Whole Field," or "Start of Field") for any future search during
your current session. That's why the new setting doesn't appear to "stick."
However, the next time you open the database in Access, it will use your new
default "Any Part of Field" for searches, so you won't have to apply it
manually again.

If using 2007 then select the Office Butotn and then Access Options, then in the options select Advanced, then look at the list and where it has Default Find and Replace Behaviour select the General Search. Then close the database, next time you open it and search will come up with the feature you need.
 
Last edited:
Upvote 0
Glad to have helped.

Have a good weekend.
 
Upvote 0

Forum statistics

Threads
1,213,526
Messages
6,114,136
Members
448,551
Latest member
Sienna de Souza

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top