We help IT Professionals succeed at work.
Get Started

syntax to reference a combobox field on a subform

MeowserM
MeowserM asked
on
339 Views
Last Modified: 2012-05-10
Hello:

I have a form with a tab control on it.  In the tab control I have several subforms.  On the one subform I have a combobox field.  I am trying to write some vba code that says if the combobox field is null then display a message.  I have tried this several ways but I think I am not using the correct syntax to reference the combobox field.  I have a suspicion that I don't have the right subform name.  
Here is the code I have right now:
If IsNull(Forms!FrmAudit!AuditScheduleDetail.cboAuditElement) Then
MsgBox ("You must enter something in AuditElement field")
Else
End If

Thank you in advance

Comment
Watch Question
Engineering Manager
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE