Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Jan 3, 2001

Another Way of Handling Null Database Fields


A compact way of handling null database fields is as follows:
 
txtText1.text = Format(rs!Field)

If rs!Field is null, Format(rs!Field) will resolve to an empty string. Otherwise the value in the recordset field will be entered into the text box. This behavior of Format() is rarely noticed but is useful because it makes code simpler to read.
Stuart Hallows
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap