I am trying to query a table where the user is prompted to enter a location code. If they don't put in a location code, the query should return all locations, else, return the location they entered.
What would be the syntax in the criteria line of the query to get the above results? Lets say the location code field name is loc_code...
I've tried-
[Enter location code:] Or Nz([loc_code],"")
This criteria gives me back all locations if I don't put any location code in but still gives me all locations if I put in a specific location code.
Any suggestions would be appreciated.
What would be the syntax in the criteria line of the query to get the above results? Lets say the location code field name is loc_code...
I've tried-
[Enter location code:] Or Nz([loc_code],"")
This criteria gives me back all locations if I don't put any location code in but still gives me all locations if I put in a specific location code.
Any suggestions would be appreciated.