Solved

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

Posted on 2013-01-17
6
272 Views
Last Modified: 2013-01-17
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
Comment
Question by:gracie1972
  • 3
  • 3
6 Comments
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 250 total points
ID: 38789884
Use

Me.txtsme.setfocus
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 38789885
Private Sub SME_Click()

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

End If
End Sub
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38789894
Also,  with the if..thens on single lines, you should remove the End If.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 38789933
Private Sub SME_Click()

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

End If
End Sub
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 38790134
thank you mbizup
it was just a mistake of not hitting the enter key
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38790209
Np, Cap - thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access query with left expression 9 32
Cross Tab with two column values 7 38
Prevent use of Microsoft Office application 9 54
Problem with syntax with TransferDatabase 3 15
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now