• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

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
0
gracie1972
Asked:
gracie1972
  • 3
  • 3
2 Solutions
 
mbizupCommented:
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
 
mbizupCommented:
Also,  with the if..thens on single lines, you should remove the End If.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
Rey Obrero (Capricorn1)Commented:
thank you mbizup
it was just a mistake of not hitting the enter key
0
 
mbizupCommented:
Np, Cap - thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now