Form-based pararmeter query with multiple controls used for one criteria.

tim_tims33

New member
Local time
Today, 00:45
Joined
Jun 26, 2007
Messages
9
Hi,

My form-based search mechanism uses controls to set the parameters for the query data source.

I have one field call quantity in stock. I could you a Between and And method to allow the end user to input the stock quantity they want.

HOWEVER, i would love it for the user to first select the Comparison Operator (e.g. > , <, >=, <=) from a combo box and then in an adjacent text box, enter the quantity.

The expression i entered in the query goes something like this.... Forms![frmSearch]![cboRange] & [Forms]![frmSearch]![txtQuantity]

When i try and run this, i get the message "THe expression is too complex to be evaluated".

Any ideas how to get around this problem?

Many thanks

t
 
You supply parameters to SQL. Parameteres can only be VALUES, not language elements, like you attempted. You can on the fly construct different SQL statements depending on user's choices like this: http://allenbrowne.com/ser-62.html
 

Users who are viewing this thread

Back
Top Bottom