Determine whether a forms control is blank

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I determine whether a controls value is blank or unselected from code? This could be a textbox, combo or list bo

Jonh H
 
Use the IsNull() function.

Presumably you know the name of the form, and the name of the control, so:

If IsNull(Forms("NameOfYourFormHere").Controls("NameOfYourContolHere")) Then
....

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

John H said:
How do I determine whether a controls value is blank or unselected from
code? This could be a textbox, combo or list box
 

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

Back
Top