Can I tab to another field based on a check box?

This is probably a simple question.

When I click on a value on a form where there are multiple check boxes, if I check a box (SME), I want the code to take me to another field that is a text box (other) for additional information to capture...

If it is not checked do nothing.

Clearly my code is not working.....

 Private Sub SME_Click()

If Me.SME = False Then Exit Sub
If Me.SME = True Then GoTo me.txtSME

End If
End Sub
gracie1972Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
Private Sub SME_Click()

If Me.SME = False Then Exit Sub
If Me.SME = True Then  
me.txtSME.setfocus

End If
End Sub
0
 
mbizupConnect With a Mentor Commented:
Use

Me.txtsme.setfocus
0
 
Rey Obrero (Capricorn1)Commented:
Private Sub SME_Click()

If Me.SME = False Then Exit Sub
If Me.SME = True Then   me.txtSME.setfocus

End If
End Sub
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
mbizupCommented:
Also,  with the if..thens on single lines, you should remove the End If.
0
 
Rey Obrero (Capricorn1)Commented:
thank you mbizup
it was just a mistake of not hitting the enter key
0
 
mbizupCommented:
Np, Cap - thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.