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

Date Searching Query

Status
Not open for further replies.

randaj

MIS
Jan 7, 2003
34
US
Why does this not work? I have a form the has two option/radio buttons, one Yes(optYes) and one No(optNo), in the same frame (fraDate). If No is selected I would like all values returned. If Yes is selected I would like to use the Between statement to input parameters. Here is what I have that is not working.

IIf([Forms]![frmAdvQry]![FraDate]![optNo]=2,[tblNotebook_Sub]![Date],Between [Start Date] And [End Date])

I set the data index value for No to 2, and Yes to 1.
 
Tell Access where [StartDate] and [EndDate] are: Between Forms!frmAdvqry![StartDate] And Forms.....

You're not alone,

TomCologne
 
That's not it. The problem is that it is always asking for the [Start] and [End] dates. It seems to me that it's not recognizing the value in the frame.
 
Try this:
[Forms]![frmAdvQry]!FraDate.optNo=2
I have not used frames yet, but your syntax would refer to 2 fields on the form.

Hope this helps,

TomCologne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top