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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCESS QUERY QUESTION

Status
Not open for further replies.

Awarmplace1

Technical User
Nov 29, 2001
11
US
How do i use the asterick in a query that is referencing a form in the criteria...I am trying to get the query to find and part of the information that i put into the form.....help!!!!!!
 
You would use the LIKE operator and put an asterisk on each end of the arguement in the query criteria. If you're using the design view, turn on Totals and set the Total row to "Where" (The Show checkmark will turn off.) In the criteria row type:

LIKE * & (form reference here) & *

Access will put in the quotes where needed for you. Since this is a non-show field, you'll need to drag over the same field to another spot. Just delete out the "Group By" that it automatically sets the Totals to. Hope this helps.
 
I'm not sure what you are trying to say here.
As an example
st = "Select * from tableA " & _
where TableA.name='" & [forms]![formname].[name] & "'"

This will pick the field from the form and place it into
the crieria clause.

To use it in a criteria try this
st = "Select * from tableA " & _
where tableA.name like '" & [forms]![formname].[name] & "*'"

Good Luck
Nordyck



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top