Can a public variable be used as the criteria in a query ?
What I'd like to do is have the user fill in a form to identify criteria for a select query. At times, the user may decide not to limit one or more of the fields at all.
For example, the user may want to limit the items displayed by using a defect code and the inspection cycle (both numeric data) as the criteria. However, he may then want to search for all defect types found at inspection cycle #1. Therefore, I'd want my criteria for defect code to be ">0"
When I use my public variable name in the criteria, the query seems to think I'm typing in text. It doesn't recognize that its a variable and gives me a data type mismatch error.
I've often used criteria like forms!myform!defectcode but, how could I set this up to accept numeric and text options ?
Any ideas ?
What I'd like to do is have the user fill in a form to identify criteria for a select query. At times, the user may decide not to limit one or more of the fields at all.
For example, the user may want to limit the items displayed by using a defect code and the inspection cycle (both numeric data) as the criteria. However, he may then want to search for all defect types found at inspection cycle #1. Therefore, I'd want my criteria for defect code to be ">0"
When I use my public variable name in the criteria, the query seems to think I'm typing in text. It doesn't recognize that its a variable and gives me a data type mismatch error.
I've often used criteria like forms!myform!defectcode but, how could I set this up to accept numeric and text options ?
Any ideas ?