Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying Access Databases - Advanced??

Status
Not open for further replies.

luke2k02

Technical User
Nov 9, 2001
1
AU
I have been having quite a bit of difficulity with Microsoft Access 2000, and queries etc.

I would like to be able to enter search details in a form, and have the results popup in another form.

And the other thing, when I try to look for a field called "Mexican Cooking" by just typiong in "mexican" it finds no matches - is there any way to make this work.

I WOULD REALLY APPRECIATE A REPLY ASAP - the assignment is due on Monday, and I have sooo much stuff to do. Thanks guys/chicks.
happy.gif
 
For the 1st q:

On the button to open search results form OnClick event:

Dim strCriteria as string
strCriteria = "FieldInResultsForm=CorrespondingTextBoxInSearchForm"
DoCmd.OpenForm "ResultsForm",,,strCriteria

See OpenForm method help topic for more info.

2nd q: Use the like operator (ie Like Criteria & *).

To use this feature for previous purpose, it will look something like this

DoCmd.OpenForm "ResultsForm",,,"FieldInResultsForm Like '" & TextBoxInSearchForm & "*'"

Watch for single quotes! After Like there is space, single quote, double quote....After the * there is a single quote, then double quote.

Good luck
Mangro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top