[completiondate_45] a field created from another date/type filed +45.
The issue seems to be with Date()
I looked at eh link you attached but I'm not sure how that would plug into
this?
When I remove all reference to Date() it works.
Below: I add in DateDiff reference using Date() and it does not work…
ORIGINAL - Does Not Work
DaysRemaining_45: IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([completiondate_45]<Date(),"OVER DUE",IIf([csreceiptdate]
Is Null And [receiptdate] Is Null,"NO DATE",IIf([csreceiptdate] Is
Null,DateDiff("d",Date(),[receiptdate]+45),DateDiff("d",Date(),[csreceiptdate]+45)))))
WORKS - Removed all reference to Date()
DaysRemaining_45: IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([csreceiptdate] Is Null And [receiptdate] Is Null,"NO
DATE"))
DON"T WORK - When adding any reference to Date()
DaysRemaining_45: IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([csreceiptdate] Is Null And [receiptdate] Is Null,"NO
DATE",DateDiff("d",Date(),[csreceiptdate]+45))
Allen Browne said:
Dan, there could be a problem with one of the library references the
database uses. Any bad library will prevent them all from working. For
details, see:
Solving problems with Library References
at:
http://allenbrowne.com/ser-38.html
We assume that [completiondate_45] is a Date/Time type field in a table, not
a Text type field. If it is a calculated field from a query, it may need
typecasting to ensure Access understands it. Details in:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
Dan @BCBS said:
I would call this an emergence! There are people throughout the state
using
this database and now it's down. Strange thing is that no changes were
made
in days.
Anyway: I have narrowed the problem down to a statement in a query.
When I remove any reference to "Date()" it works..
Example:
THIS WORKS:
DaysRemaining_45: IIf([issueclosedate] Is Not Null,"CLOSED")
THIS DOES NOT:
DaysRemaining_45: IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([completiondate_45]<Date(),"OVER DUE"))
Completiondate_45 is just a date value like 01/01/07
Any suggestions????