Basically, yes. The user selects the parameter from the list which the query is based on. But for some reason, I run into the above problem with only the Last Name and the City query. The other queries are fine and don't mess with the data.
Ok, I have narrowed the problem down to a cause, but I'm at a loss for a solution.
I have a query form which has several listboxes.
Ex:
Last Name listbox - Displays last names in the database
City Listbox - Displays the cities in the database
State Listbox - Displays the States
Zip - Displays...
I have a data entry form with your standard fields: FName, LName, Address 1, Address 2, City, State, Zip and so on. Quite often, the data in the database changes. For example:
Record 1
FName: Joe
LName: Smith
Address 1: 123 Main Street
City: New Youk
State: NY
Zip: 12212
Record 2
FName...
Ok, I got it. It was just a simple matter of syntax. Here is the correct query:
SELECT *
FROM [Sample Contact Table]
WHERE ((([Sample Contact Table]![Stores])
LIKE '*' & [Forms]![Print, Report, and Query Form]![lstSelectStore] & '*'));
It was the single quotes around the wildcard character...
I tried this query:
"SELECT *
FROM [Sample Contact Table]
WHERE [Sample Contact Table]![Stores] Like '*" & [Forms]![Print, Report, and Query Form]![lstSelectStore] & "*'"
But I get an Access error "Invalid SQL Statement; expected 'DELETE', 'INSERT', 'PROCEDURE'...
Hello there. Is there anyone who can help me?
Ok, here is the scenario:
I have a database table which has a “Stores” field in it among other fields. In this field are a list of stores (codes to identify stores, more specifically) separated by a hyphen. For example: “-ALB-WAL-CVS” (i.e...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.