When Check Box selected...

  • Thread starter dropdown3 via AccessMonster.com
  • Start date
D

dropdown3 via AccessMonster.com

I have a Check Box for Coin and Currency. I want:

1.) If check box for coin selected, move to text box [Pennies]
2.) If check box for currency selected, move to text box [Currency].

I was hoping I could use a macro, but I couldn't seem to find one that would
work.

Chuck
 
J

jahoobob via AccessMonster.com

If you places the two checkboxes in an option group named Frame0 then in the
AfterUpdate property of Frame0, place this code:

Private Sub Frame0_AfterUpdate()
If Me!Frame0 = 1 Then
DoCmd.GoToControl "Pennies"
End If
If Me!Frame0 = 2 Then
DoCmd.GoToControl "Currency"
End If
End Sub

I have a Check Box for Coin and Currency. I want:

1.) If check box for coin selected, move to text box [Pennies]
2.) If check box for currency selected, move to text box [Currency].

I was hoping I could use a macro, but I couldn't seem to find one that would
work.

Chuck
 
G

Guest

I agree with the previous poster's recommendation that you wrap the two check
boxes in a option group. Assign the Option Value of 1 for coins and 2 for
currency. However, I would use different commands.

If Me.opgCashType = 1 Then
Me.txtPennies.SetFocus
Else
Me.txtCurrency.SetFocus
End If
 
J

jahoobob via AccessMonster.com

More straightforward than my code!
I agree with the previous poster's recommendation that you wrap the two check
boxes in a option group. Assign the Option Value of 1 for coins and 2 for
currency. However, I would use different commands.

If Me.opgCashType = 1 Then
Me.txtPennies.SetFocus
Else
Me.txtCurrency.SetFocus
End If
I have a Check Box for Coin and Currency. I want:
[quoted text clipped - 5 lines]
 
D

dropdown3 via AccessMonster.com

I may be pressing my luck with this one, but how about when a check box is
selected it disables/hides inappropriate check boxes?

My form has a check box for Coin and one for Currency. When you click the
check box for coin, it disables or hides all the currency denomination
textboxes.

If Coin (Coin = 385) selected only allow these textboxes:
[Pennies] [Nickels] [Dimes] [Quarters] [Dollars] [Halves] [Rolled Coin]
[Boxed Coin]

If Currency (Currency = 390) selected only allow this textbox:
[Currency]

There are other controls and textboxes on the form so I want to keep them
accessible, but these are the ones that directly relate to either coin being
selected or currency being selected.

Chuck
 
D

dropdown3 via AccessMonster.com

Would I get a quicker response to post my last question as a new post?

Chuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top