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

Using a option group to set criteria

Status
Not open for further replies.

dannyocean

Technical User
Jan 26, 2001
136
US
Hi,

I am trying to be able to use a form to set criteria for a query. This query needs to be able to either pull by recieved date or closed date. I put an option group on my criteria form. I am having trouble making the logic with the option group work.

The user will determine if they want their data by recieved date or closed date by choosing one of the choices in the option group.

This will allow me to only build one set of queries instead of a set for both recieved and closed.

TIA,

Danny

 
Hi

In the query:

WHERE (optGroup = 1 AND datClosedDate = FORMS!frmName!txtDate) OR (optGroup = 2 AND datReceivedDate = FORMS!frmName!txtDate)



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi sorry, type, should be

WHERE (FORMS!frmName!optGroup = 1 AND datClosedDate = FORMS!frmName!txtDate) OR (FORMS!frmName!optGroup = 2 AND datReceivedDate = FORMS!frmName!txtDate)



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top