Find and Replace Macro

ndello

Active Member
Joined
Oct 16, 2002
Messages
379
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
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,658
Office Version
2016
Platform
Windows
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:

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,658
Office Version
2016
Platform
Windows
Glad to have helped.

Have a good weekend.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,505
Messages
5,511,705
Members
408,862
Latest member
sidneybc

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top