Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is this function again?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00245951
Message ID:
00246068
Vues:
24
>I have a form with my data object bound to a access MDB database ans some fields do not have any entre so the value is null.
>
>How can I know if the field is empty. I need to know if it empty or null. Same thing for me.
>
>I know we can use a function but I cannot find it.

By "bound", do you mean that you had set the DataSource and the DataField properties? If so, I think that the only way to correct it is to insure that your database doesn't contains Null.

If you populate yourself controls on the forms, there is at least 2 ways:
1. Use the IsNull() function.
example: text1.text = iif(isnull(rs!field1), "", rs!field1)
2. If your fields are text fields, concatenate an empty string to it.
example: text1.text = rs!field1 & ""

I don't know any functions that returns a value telling if the programmer is null. Maybe in the next version! Send your request to the VB wish list!!!
É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