-
Invalid use of Null
Hi,
I want to populate a forms text boxes from an Access DB, if any of the fields are empty I get Invalid use of Null error, how can I get over this? what I have tried is:
If Address.Fields("Suburb") = Null Then txtSurburb.Text = ""
Any help appreciated.
Regards,
Alan.
-
Re: Invalid use of Null
Try this:
txtSuburb.text = Address.Fields("Suburb") & vbNullString
That way you won't need the if statement.
Hope this helps,
Nathan Liebke
-
Re: Invalid use of Null
I think you can set that field to allow NULL value during you define the table provided it's not a key.
cksiow
http://vblib.virtualave.net - share our codes
-
Re: Invalid use of Null
there is a function to check if the field is null.
try this:-
if not isnull(fieldname) then
code
end if