Solved

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

Posted on 2013-01-17
6
274 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

777 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