Empy String vs. Null

P

Paul Hammond

I should know and understand this, but I don't. Could somebody please
review the difference between these to values?

I have a column that either contains a code or it does not, but I have to
test for both null and "". I just can't understand the difference.

Please 'splain it to me.

TIA

Paul Hammond
--
 
O

Ofer

When I filter the data, I keep in mind few things

In a Number and date field, I check for Null
In a Text field I check for Null and Empty

the text field before any value been enterd into will return a Null, but if
a value was entered into a text field, and then been deleted by the user in
the form, will return empty.

If I'm wrong by that I'll be happy if somebody will correct me.
 
D

Douglas J Steele

Think of Null as meaning "Unknown"

Take a look at the Employee table in the Northwind database that came with
Access. There are fields for information about the employee, including who
they report to. If you were to add an employee to the table, and you didn't
know to whom they reported, you'd leave the ReportsTo field as Null, because
it's unknown (at least to you). Once you found out, you'd fill the field in.
If, however, a particular person didn't report to anyone, you'd put blank
in, because now you know to whom they report, and it's no one. (I know, not
the greatest example, but it was the easiest to think of in terms of
databases to which you should have access!)
 
Top