HELP WITH THIS SIMPLE QUERY

Milan

Registered User.
Local time
Today, 02:39
Joined
Feb 17, 2002
Messages
85
HI ALL!!! I HAVE A QUERY BELOW -:
BASICALLY ALL I AM DOING IS GETTING THE RESULT BASED FROM A FORM , TXTBOX NAMED TXTCOST. IF I PUT "ALL" THEN IT RETURNS ALL THE RECORDS IN THE QUERY , AND IF I SPECIFY A PARTICULAR COST I.E 100 THEN IT RETURN EVERYTHING AT 100. ALL WORKS GREAT. HOW CAN I GET THE QUERY TO RETURN A VALUE THAT IS GREATER THEN. SO FOR EXAMPLE I WOULD ENTER IN THE TXTCOST CONTROL ">100" AND WOULD RETURN EVERYTHING GREATER THEN 100. I WOULD OBVIOUSLY LIKE TO STILL KEEP THE EXISTING "ALL" SEARCHES AND SPECIFIC VALUES THAT ALREADY WORK.. WHAT DO I NED TO ADD THE THE EXPRESSION???.

Like IIf(([invoicelines]![EXTENDEDPRICE])=IsNull([Forms]![FrmVehicleEnquiry]![Txtcost]) Or [Forms]![FrmVehicleEnquiry]![TxtCost]="All","*",[forms]![FrmVehicleEnquiry]![TxtCost])


MANY THANKS


MILAN
 
If your price is a text field, I'm not sure you can do what you're asking. Your use of the word LIKE leads me to believe this is true. Assign the correct field type and it will become much simpler. (Your form, I think, should still be able to use "All" if its field is text, just convert any numeric value to an integer before doing the > comparison).

HTH,
David R


[This message has been edited by David R (edited 03-08-2002).]
 

Users who are viewing this thread

Back
Top Bottom