Question : Empty Strings and Null String

I am fairly new to MS Access and just have a fairly simple question. When doing text box checks I always check IsNull(textbox) and textbox <> "". Then today it occured to me that the text boxes could also contain a string with all spaces. However when I did some experimenting I found that it was not possible to enter just spaces in a text box and store them, the textbox would just be set as null, correct me if I am wrong.

My question is, is there anyway that a textbox could even be = "" (empty string) or would it always be set to null. If so I want to remove the empty string test to save myself trouble in the future and clean my current code code up.

Answer : Empty Strings and Null String

This simple test:

IF Nz(Me.YourTextBox, "") = ""  Then
 '** do whatever

Also - see this important link regarding Empty strings (zero length strings) ... then just say No to ZLS's:

See this link:

http://allenbrowne.com/bug-09.html

scroll down to Zero Length String

mx
Random Solutions  
 
programming4us programming4us