If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date comparison in IIF statement in a query
I have a form with a control containing a date. This date is used in a query
as part of a IIF statement included in the criteria row of the query: IIf(IsNull([Forms]![RiderMatchAnalysis]![Start Date]),[Meeting]![MeetingDate],[Forms]![RiderMatchAnalysis]![Start Date]) The syntax must be wrong in some way as it does not return any records. Any help would be appreciated. Thanks. |
#2
|
|||
|
|||
Date comparison in IIF statement in a query
LL wrote:
I have a form with a control containing a date. This date is used in a query as part of a IIF statement included in the criteria row of the query: IIf(IsNull([Forms]![RiderMatchAnalysis]![Start Date]),[Meeting]![MeetingDate],[Forms]![RiderMatchAnalysis]![Start Date]) The syntax must be wrong in some way as it does not return any records. You can not include a partial expression (operator) inside a function because function just return a value. Try something more like: (thefield = Meeting.MeetingDate And Forms!RiderMatchAnalysis![Start Date] Is Null) OR thefield Forms!RiderMatchAnalysis![Start Date] I suggest that you make that change in SQL view before seeing how Access messes with it in design view. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|