function that would lookup for null value

  • Thread starter Thread starter magickarle
  • Start date Start date
M

magickarle

Hi, I'm trying to find a way to look in a table for null value.
If there's a null value, then I would show a msg box, if not, I would
show another msg box.

I would prefer something like dlookup, dcount ...
I've tried rs.Find "TrackingNO = Null" but not sure how to integrate
it to a if (since it doesn’t flag if it found a null or not, it merely
returns the row of the recordset.

thank you
 
Null is a special case. Null means "unknown". You can't use boolean
comparison operators with Null, since "unknown" could mean 2 in one case and
"elephant" in another...

If all you want is to know whether there are any Null values in the table,
you can using

DCount("*", "[NameOfTable]", "TrackingNO IS NULL")



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Hi, I'm trying to find a way to look in a table for null value.
If there's a null value, then I would show a msg box, if not, I would
show another msg box.

I would prefer something like dlookup, dcount ...
I've tried rs.Find "TrackingNO = Null" but not sure how to integrate
it to a if (since it doesn’t flag if it found a null or not, it merely
returns the row of the recordset.

thank you
 
Null is a special case. Null means "unknown". You can't use boolean
comparison operators with Null, since "unknown" could mean 2 in one case and
"elephant" in another...

If all you want is to know whether there are any Null values in the table,
you can using

DCount("*", "[NameOfTable]", "TrackingNO IS NULL")

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)


Hi, I'm trying to find a way to look in a table for null value.
If there's a null value, then I would show a msg box, if not, I would
show another msg box.

I would prefer something like dlookup, dcount ...
I've tried rs.Find "TrackingNO = Null" but not sure how to integrate
it to a if (since it doesn’t flag if it found a null or not, it merely
returns the row of the recordset.

thank you

Thank you. That did it!
 
Back
Top