Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to solve this ?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00384376
Message ID:
00384403
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform