By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,644 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

How to Disable a checkbox in another form while one is selected in another form

P: 4
I have 2 forms and I want to grey out a checkbox or option button in the 2nd form when one checkbox/optionbutton is selected in this 1st form
Please HELP!!

Thanks
Jan 8 '15 #1

✓ answered by twinnyfo

You must refer to the Form:

Expand|Select|Wrap|Line Numbers
  1. Forms![FormName].Form.opt13.Enabled = False

Share this Question
Share on Google+
6 Replies


P: 4
Expand|Select|Wrap|Line Numbers
  1. Private Sub opt5_AfterUpdate()
  2.     opt5.Enabled = True
  3.         If opt5 = True Then
  4.             opt13.Enabled = False
  5.                 MsgBox "Due to similar course material, you will not be able to select A alongside B"
  6.         If opt5 = False Then
  7.             opt13.Enabled = True
  8.     End If
  9.     End If
  10. End Sub
Jan 8 '15 #2

twinnyfo
Expert Mod 2.5K+
P: 3,482
You must refer to the Form:

Expand|Select|Wrap|Line Numbers
  1. Forms![FormName].Form.opt13.Enabled = False
Jan 8 '15 #3

P: 4
Thanks for the reply but having tried it,
it now gives me and error saying Microsoft Access can't find referenced form 'frmModSelect2' - - - Run time error - 2450

Also that is the name of my form
Jan 8 '15 #4

twinnyfo
Expert Mod 2.5K+
P: 3,482
Are you sure the form is open? Named properly? I know, stupid questions, but we have to ask....
Jan 8 '15 #5

Rabbit
Expert Mod 10K+
P: 12,430
Is it a subform? If it is, you need to reference it through the parent form.
Jan 8 '15 #6

P: 4
Thanks guys!! I have got it now
Jan 8 '15 #7

Post your reply

Sign in to post your reply or Sign up for a free account.