querying an empty date field with IsNull problem (1 Viewer)

alant37

Registered User.
Local time
Today, 09:00
Joined
Jun 8, 2005
Messages
10
I am using the QBE grid and am writing a select query to select only records with an empty Date Closed Field. The Date Closed field is a Date/Time Field. I am using Access 2003. When I use in the criteria IsNull([DateClosed]) I do not get any records selected which have an empty Date Closed field, have I a bug? and if so please could anyone point me in the right direction.
 

alant37

Registered User.
Local time
Today, 09:00
Joined
Jun 8, 2005
Messages
10
I have found what my problem is

I have altered the QBE grid so now there is a new Field: IsNull([Date Closed]) with Criteria False, this now gives me the required results. I think it was just myself not knowing how the QBE grid works.
 

Jon K

Registered User.
Local time
Today, 09:00
Joined
May 22, 2002
Messages
2,209
You don't need to create a new field. You can just put Not Is Null in the criteria for the Date Closed field.
.
 

alant37

Registered User.
Local time
Today, 09:00
Joined
Jun 8, 2005
Messages
10
thanks

thanks John that works fine, but if I wanted to select the records which had an empty date closed, if I use IsNull([Date Closed]), nothing appears, whys that?
 

alant37

Registered User.
Local time
Today, 09:00
Joined
Jun 8, 2005
Messages
10
sorry

i was being stupid, i realise just put Not Is Null in the criteria field
 

Users who are viewing this thread

Top Bottom