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

Passing string vars into query criteria for a numeric field ACCESS 03

Status
Not open for further replies.

noneckdre

MIS
Mar 23, 2007
1
US
Hello

I am trying to pass a user created string into the criteria for a numerical field in a query using the [Form]![Field] method in the query criteria. I can see that the string assemble correctly so that the values passed look like (without the quotes) "3" or "3 Or 5" or "Is Not Null" but the query refuses to run. When I type these values in manually, it operates correctly, just not if I pass them to query criteria through a form. Is there some form or variable command I need to use to make these acceptable statements in the criteria of the query? Any help is really appreciated.

Thanks!
 
Your values passed from a control on a form can't contain conditions and/or operators. What are you attempting to do? What exact values are you typing into your control? What is the SQL view of your query?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top