Finding all records that contain a certain value

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
 
S

Steve Schapel

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] & "*"
 
J

jenVBA

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top