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

Multiple checkboxes on the form

P: 3
I'm building the application using Access 2007.
I have four checkboxes on my form. Checking off different checkboxes will control the VBA routines "behind" the button.

I realized, that during the execution of the form, my four checkboxes behave like "radio buttons": only one checkbox can be checked off, checking second box cleares the first one. Am I doing something wrong? Missing something?

Also: how do I read the status of the box? There is no "value" property (as in VB6).

Thank you in advance for your advice!
Feb 21 '08 #1
Share this Question
Share on Google+
5 Replies


P: 12
you most likely placed the checkboxes inside a Frame in order to group them together logically. You really want to place them inside a Rectangle, not a frame. The Frame will allow only a single checkbox to be "checked" whereas the Rectangle will allow any, all, or none of the checkboxes to be checked at the same time.
Feb 21 '08 #2

P: 3
Thanks, maxvernon. That was it!

Now: how can I set initial values on checkboxes and option (radio) buttons using VBA? There is no "value" property...
Feb 21 '08 #3

mshmyob
Expert 100+
P: 904
For a CheckBox control just do it like this. Replace 'chkControl' with your checkbox control name

Expand|Select|Wrap|Line Numbers
  1. ' check for FALSE means NOT CHECKED
  2. If Me.chkControl = False Then
  3.     'do something here 
  4. Else
  5.     'do something else
  6. End If
  7.  
Cheers,

Thanks, maxvernon. That was it!

Now: how can I set initial values on checkboxes and option (radio) buttons using VBA? There is no "value" property...
Feb 21 '08 #4

missinglinq
Expert 2.5K+
P: 3,532
Mshmyob's code does set the checkbox's .Value property! Why did you think it didn't have one?

Welcome to TheScripts!

Linq ;0)>
Feb 21 '08 #5

P: 3
Mshmyob's code does set the checkbox's .Value property! Why did you think it didn't have one?

Welcome to TheScripts!

Linq ;0)>
Great place! So much information here! And help, too.

You're right, it's there, but not shown in the Property Sheet.

Thanks !
Feb 21 '08 #6

Post your reply

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