>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