Ok. So, you don't like all the extra typing.
[tt]If not isnull(value) then
use it
else
set it to something usable
end if[/tt]
You would prefer to use a default date of '1/1/1900', right. Well, what do you show a user? Do you want them to see the 'bogus date that really means (I don't know)'? For example, suppose you are collecting birthday. Also suppose that it is not a mandatory field. So, if the user does not enter a birthday, you use 1/1/1900. When another user pulls up this record, do you want to show them 1/1/1900? Probably not. So, instead, you would have code like...
[tt][blue]
If cDate(DatabaseColumnValue) = cDate("1/1/1900") Then
txtBirthday.Text = ""
Else
txtBirthday.Text = Format(DatabaseColumnValue, "Short Date")
End If
[/blue][/tt]
I don't see that as less typing. Of course, you could always take the Quick & easy approach.
txtBirthday.Text = "" & RS("Birthday")
When you concatenate a string with NULL, you end up with the string. So, if RS("Birthday") is null, the text box would be set to an empty string. If it's not null, the textbox would take the value of the recordset column's value.
So, what's my point?
Well, if you are going to all 'unknowns', it no less (and no more) work than dealing with default values that represent unknown. But, if you use NULL, there is no ambiguity. NULL is NULL. That's it.
Now, you might think that it's a good idea to not allow unknown. This is a conceptual requirement that would cause a lot of headaches with your users. Often times, databases hold certain unnecessary information (I like to call the 'Eye Color' columns). If you don't allow unknowns for these fields, you will end up getting bogus data. Your users may end up fabricating data just to satisfy the 'no unknowns' requirement.
Face it. Your stuck writing the code no matter how you look at it.
-George
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom