R
Rachel
I have a Form in which the user selects criteria to show
in the query.
Query Fields:
Soc_Sec_No
First_Name
Last_Name
Address
City
State
Zip
Phone
Inactive_Date
The form allows the user to Select "Show all" or specify a
Soc Sec No, First Name, Last Name or a Date Range
(FromDate and ToDate) for the Inactive Date.
The generic criteria on the Query field for Soc Sec No,
Last Name, First Name is (each named accordingly): Iif
(IsNull([Forms]![FormName]![FormFieldName]), Query
FieldName, [Forms]![FormName]![FormFieldName])
This works well when the user specifies these particular
fields or selects the "Show All".
Now when I added the following criteria to the
Inactive_Date, it bombs out and NOTHING works!
Iif(IsNull([Forms]![Report_Options]![FromDate]) And IsNull
([Forms![Report_Options]![ToDate]), Inactive_Date, Between
[Forms]![Report_Options]![FromDate]And [Forms]!
[Report_Options]![ToDate])
Any help or suggestions would be greatly appreciated!
in the query.
Query Fields:
Soc_Sec_No
First_Name
Last_Name
Address
City
State
Zip
Phone
Inactive_Date
The form allows the user to Select "Show all" or specify a
Soc Sec No, First Name, Last Name or a Date Range
(FromDate and ToDate) for the Inactive Date.
The generic criteria on the Query field for Soc Sec No,
Last Name, First Name is (each named accordingly): Iif
(IsNull([Forms]![FormName]![FormFieldName]), Query
FieldName, [Forms]![FormName]![FormFieldName])
This works well when the user specifies these particular
fields or selects the "Show All".
Now when I added the following criteria to the
Inactive_Date, it bombs out and NOTHING works!
Iif(IsNull([Forms]![Report_Options]![FromDate]) And IsNull
([Forms![Report_Options]![ToDate]), Inactive_Date, Between
[Forms]![Report_Options]![FromDate]And [Forms]!
[Report_Options]![ToDate])
Any help or suggestions would be greatly appreciated!