checking a blank text box

A

Andy G

I have a text box that I want to check if it is blank/null/empty. Sounds
easy, no problem huh. Initially when the form is opened the text box has
the following characteristics:

- Is not null
- Length is 0 [Len(txtBox)]

Let's say the user types something in there and then removes it. So the
text box is blank as it was when it was open but has different
characteristics now.

- Is null
- Length is nothing or blank [Len(txtBox)]

This is VERY frustrating. Is there any way to check for a text box being
blank/null/empty after a user types in a value and removes it?
 
S

SusanV

Checkbox <> True
or
Checkbox <> -1
or even
Checkbox <> Yes

(All three values signify the box is checked)
 
A

Andy G

Please read post again.

Text box not check box.


SusanV said:
Checkbox <> True
or
Checkbox <> -1
or even
Checkbox <> Yes

(All three values signify the box is checked)
--
hth,
SusanV


Andy G said:
I have a text box that I want to check if it is blank/null/empty. Sounds
easy, no problem huh. Initially when the form is opened the text box has
the following characteristics:

- Is not null
- Length is 0 [Len(txtBox)]

Let's say the user types something in there and then removes it. So the
text box is blank as it was when it was open but has different
characteristics now.

- Is null
- Length is nothing or blank [Len(txtBox)]

This is VERY frustrating. Is there any way to check for a text box being
blank/null/empty after a user types in a value and removes it?
 
S

SusanV

Oh! Sorry, still sleepy - the word "check" registered but not the rest
<makes coffee>

For a textbox you can check for both empty string and null:

If IsNull(Me.Textbox) OR Me.Textbox = "" then
'do something
Else
'do something else
End If


Sorry for the confusion!!
--
hth,
SusanV



Andy G said:
Please read post again.

Text box not check box.


SusanV said:
Checkbox <> True
or
Checkbox <> -1
or even
Checkbox <> Yes

(All three values signify the box is checked)
--
hth,
SusanV


Andy G said:
I have a text box that I want to check if it is blank/null/empty. Sounds
easy, no problem huh. Initially when the form is opened the text box has
the following characteristics:

- Is not null
- Length is 0 [Len(txtBox)]

Let's say the user types something in there and then removes it. So the
text box is blank as it was when it was open but has different
characteristics now.

- Is null
- Length is nothing or blank [Len(txtBox)]

This is VERY frustrating. Is there any way to check for a text box
being blank/null/empty after a user types in a value and removes it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top