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

between date criteria using option group 1

Status
Not open for further replies.

fredka

Technical User
Jul 25, 2006
114
US
I have an option group (frame16) with two options - option one produces a value of 1 - if this option is checked, I want the query to filter between startdate and enddate on the form - otherwise, it will include all dates from effectivedate and filter on date received.

What I have below is not working - I was able to get a single value to work but appear to be having a problem with the between.

IIf([Forms]![frmSACmain]![frame16]=1,Between [forms]![frmsacmain]![startdate] And [forms]![frmsacmain]![enddate])

Any help would be greatly appreciated!!!

Thanks!!

Fred
 
Perhaps this ?
Between [Forms]![frmSACmain]![startdate] And [Forms]![frmSACmain]![enddate] OR [Forms]![frmSACmain]![frame16]<>1


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Wow - that is ingenius. Can you explain this to me because I am confused - I know it works because I just tested it but I am having a brain freeze about understanding it -

It appears that this would translate into:

effective date between the two dates on the form OR the option group not equalling 1

I would think you would use the "and" instead of the "or"

thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top