Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read if a control has a value. AAARGH! 1

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
This has been bugging me for time, now.
At the moment, I need to check whether a couple of combo boxes & a few text boxes have values. I have tried the follwing:
If txtName=Null Then...
If txtName="" Then...
If Len(txtName) < 1 Then...
If Not txtName Then...

Nothing works! I test everything I can think of, and at no time can I get the code to recognise that a control is blank!
Please can someone show me where I'm going hideously astray before I embark on a life as a serial killer!

Douglas JL. If it don't make you laugh, it ain't true.
 
How about
Code:
If isnull(txt1) then msgbox &quot;I'm Null&quot;
Rewdee
 
Thanks alot, man!
I never knew isnull existed! If it don't make you laugh, it ain't true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top