|
-
March 31st, 2001, 11:30 PM
#1
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.
-
April 1st, 2001, 12:25 AM
#2
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
-
April 1st, 2001, 02:37 AM
#3
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
-
April 1st, 2001, 05:16 AM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|