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

How Can I Recognise A Null Date Value 1

Status
Not open for further replies.

ooch1

MIS
Nov 4, 2003
190
GB
Hi,

This should be a simple query, as all i'm trying to do is find out whether a date is null or not.

I have declared E2 as a date variable. Within the loop i define E2 with E2=Nz(rs2![Effective From Date]):

Then my if statement egins with:

If M = M2 And (rs.AbsolutePosition + 1) <> rsEnd And F <> True And IsNull(E2) = True Then...

The problem is that when e2 is null it is not recegnising it as it should and thus not performing properly. I know this as when it is abscent the other elements work fine.

I'm not to sure whether part of the is the NZ() function, replacing it with something that is recognised as null, but i have treied it with 99/99/9999 and if e2 = 99/99/9999 and this didn't work either!

All suggestions welcome!

OOch
 
If M = M2 And (rs.AbsolutePosition + 1) <> rsEnd And F <> True And Len(E2 & "") = 0 Then


This will work whether E2 is null or a zero length string.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top