Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to solve this ?
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00384376
Message ID:
00384403
Views:
20
>Hi, anyboady have an idea on how to solve this problem..
>
>When I load the data from the .mdb to the form using a my own sub I get the error message "Runtime error 94" Invalid use of null.
>
>the code is :
>privat sub LoadData()
>with rstUser
> me.txthometel = !hometel
> me.txtusrname = !usrname
> me.txtnotes = !notes
>End with
>end sub
>
>if there is a data in the field, no errors, but if theres no data like the "hometel" or the "notes" fields I get the error.
>
>any idea how to skip this.

The easiest way to that is to concatenate an empty string to your field.
with rstUser
   me.txthometel = !hometel & ""
   me.txtusrname = !usrname & ""
   me.txtnotes = !notes & ""
End with
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform