Text box verification

  • Thread starter nilrickbl via AccessMonster.com
  • Start date
N

nilrickbl via AccessMonster.com

Good day.

I have a form with a text box for data entry and a check box associated with
this text box.

when the data(name of a test unit) is entered in the text box, the person is
supposed to click the check box(to verify the test unit has been tested).

At the end of the form is a command button to check the form for any empty
text boxes or/and un-checked check boxes.
Something like this:
if the text box has data & the check box is 1 = msgbox "good to go"
if the text box has data & the check box is 0 = msgbox "did you test this"
if the text box has no data & the check box is 1 = msgbox "why is this
checked"
if the text box has no data & the check box is 0 = msgbox "good to go"

I know how to check if text box =null, and/or, check box =0/1.
But how do i check if the text box has information in it?
any help would be greatly appreciated
 
D

Dave C

You can combine the check for null and data in one step with this command:

Len(Nz(textbox,"")) > 0
 
L

Linq Adams via AccessMonster.com

And FYI,

If text box =null

in Access VBA should be

If IsNull(Me.Textbox)

And a ticked checkbox = -1
 

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