Finding all records that contain a certain value

  • Thread starter Thread starter jenVBA
  • Start date Start date
J

jenVBA

Hi all,

I'm currently working on an address book database with all information in
one form and I have a combo box to choose all businesses from a list. However
some names are preceeded by "Garage" or "Ets." for example and therefore are
quite difficult to find. I have created another box to use as a search box
which will then pull through all Business names containing whatever I input
into the search box in a new form. Howver I'm struggling to get the macro
behind the "After Update" Event....

So, to get to the point:
Current outcome: I input "Smi" and the second form pops up with details of
ALL businesses in the table behind the database.

Desired outcome: I input "Smi" and the second form should pop up with
details of "Smith", "Garage Smithe", "Ets. Smithwood", etc...

Could anyone please give me an indcation of what I should change to make
this only pull through all records containing what has been input?

Thanks in advance!
A very bewildered Jen
 
Jen,

I think the Criteria in the query that your second form is based on,
will be the equivalent of this:
Like "*" & [Forms]![NameOfFirstForm]![NameOfSearchTextbox] & "*"
 
Duly amended and works a treat.

Thanks Steve!



Steve Schapel said:
Jen,

I think the Criteria in the query that your second form is based on,
will be the equivalent of this:
Like "*" & [Forms]![NameOfFirstForm]![NameOfSearchTextbox] & "*"

--
Steve Schapel, Microsoft Access MVP
Hi all,

I'm currently working on an address book database with all information in
one form and I have a combo box to choose all businesses from a list. However
some names are preceeded by "Garage" or "Ets." for example and therefore are
quite difficult to find. I have created another box to use as a search box
which will then pull through all Business names containing whatever I input
into the search box in a new form. Howver I'm struggling to get the macro
behind the "After Update" Event....

So, to get to the point:
Current outcome: I input "Smi" and the second form pops up with details of
ALL businesses in the table behind the database.

Desired outcome: I input "Smi" and the second form should pop up with
details of "Smith", "Garage Smithe", "Ets. Smithwood", etc...

Could anyone please give me an indcation of what I should change to make
this only pull through all records containing what has been input?

Thanks in advance!
A very bewildered Jen
 
Back
Top