I am hoping someone can help me!
I have several date fields which i need the query to return based on whether the field has a date.
If Field A has a date but not B it returns A however,
If Field B has a date it returns B (even if A has a date)
I am hoping someone can help me!
I have several date fields which i need the query to return based on whether the field has a date.
If Field A has a date but not B it returns A however,
If Field B has a date it returns B (even if A has a date)
In a query you could use
DateToDisplay : Nz([DateB],[DateA])
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
hi Minty,
It is returning that the expression entered has an invalid.(dot) or ! operator or invalid Parentheses?
Can you paste exactly what you used in the query ?
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
DateToDisplay : Nz([QI Alerts Query_3rd Due:3rd Due],[QI Alerts Query_2nd Due:2nd Due])
I have Fields as below
1st Quarter 2nd Due 2nd Quarter 3rd Due
I only enter actual dates into the Quarter fields and the due dates automatically populate. I want to pull out the due dates, but only show the most recent due date. i.e if the 2nd quarter has not yet been completed there will be no date in this or the 3rd due field so I want it to return the 2nd Due, but if this has been completed the 3rd Due will be the date I want returned.
Is this possible?????
Advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention.
You need to use an IIf() or Switch() function instead of Nz().
IIf([2nd Quarter] Is Null, [2nd Due], [3rd Due])
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.