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
 
Back
Top