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

Checkboxes in Listbox Possible?

P: 6
MS Access Checkboxes in Listbox Possible?
Would like to have display checkboxes in a listbox, so users can click what they want and then when click on Save button selected values of checkboxes will be stored in the MS Access table. Thanks.
Oct 20 '08 #1
Share this Question
Share on Google+
19 Replies


GazMathias
Expert 100+
P: 189
No.

They always display as Yes/No in List Boxes, as far as I can tell.

Also, when you click an item in a list box, you are just collecting a value (or multiple values for multi selects) for later use.

With a bit of fancy formatting, I guess you could make a continuous form achieve what you want(in a subform, maybe).

Gaz
Oct 20 '08 #2

NeoPa
Expert Mod 15k+
P: 31,186
CheckBoxes & ListBoxes are controls in their own right, but neither is a type of object that can contain other controls (as say, forms and reports are).

I'm afraid what you ask makes little sense, but the answer's no anyway.
Oct 27 '08 #3

P: 6
Thanks for the reply.

Please look at the following link, and do get back. I did try but it did not seem to have that control in MS Access.

http://office.microsoft.com/en-us/ac...1171033.aspx#3
Oct 28 '08 #4

NeoPa
Expert Mod 15k+
P: 31,186
You're asking about a ComboBox with multiple columns within it?
Oct 28 '08 #5

P: 6
It would be good, too. But, I prefer checkbox list, and also wonder if it can be set up with MSAccess 2003.
Thanks,
Oct 28 '08 #6

P: 6
I prefer checkboxes with related contents (2 columns total) within a checkbox list (in a listbox), if possible.

If not, then combox with 2 columns (checkboxes and related lables) would do.
Thanks.

You're asking about a ComboBox with multiple columns within it?
Oct 28 '08 #7

NeoPa
Expert Mod 15k+
P: 31,186
It would be good, too. But, I prefer checkbox list, and also wonder if it can be set up with MSAccess 2003.
Thanks,
Now you're losing me again. I don't recognise what you're talking about :S
Oct 28 '08 #8

P: 6
Please go to : http://office.microsoft.com/en-us/access/HA100311171033.aspx#3 , and scroll down to almost half of the page until you see "The check box list is a list box control set to support multiple values." You may see check boxes along with related labels in the screenshot. That's what I am trying to set up.

Thanks.
Oct 28 '08 #9

mshmyob
Expert 100+
P: 903
Cannot be done in AC2003. Checkbox listboxes as described are based on Multivalued fields which were introduced in AC2007. Besides nobody in their right mind would use multivalued fields in their design.

cheers,
Oct 28 '08 #10

NeoPa
Expert Mod 15k+
P: 31,186
Please go to : http://office.microsoft.com/en-us/access/HA100311171033.aspx#3 , and scroll down to almost half of the page until you see "The check box list is a list box control set to support multiple values." You may see check boxes along with related labels in the screenshot. That's what I am trying to set up.

Thanks.
Aah. I see.

I'm afraid that I am no fan of Access 2007 so am mainly unfamiliar with the features there.

As Mshmyob says though, I guess it can't be done without Access 2007.
Oct 29 '08 #11

P: 6
Thanks. I just gave it a try to ensure if AC2003 can or cannot do.
This is a good object control that gives users to not use Ctrl+mouse-click when selecting items/records in the listbox. So, I can conclude that AC2003 can't but AC2007 can.

As the alternate, I use continuous form with checkboxes. I am able to multiple-select checkboxes, but labels of those checkboxes populates as the same one.
Can someone give a tip on how to list checkboxes with related labels?

For instance,
[x] United States
[x] United Kingdom
[x] France
[ ] Russia and
[ ] China in a continuous form.

Thanks
Oct 29 '08 #12

NeoPa
Expert Mod 15k+
P: 31,186
Only bound items can be different in a continuous form (Why Values in Unbound Form Controls Don't Persist). Hence the CheckBoxes are fine (bound to the record source), but the labels are not.
Oct 29 '08 #13

NeoPa
Expert Mod 15k+
P: 31,186
The only way I can think of to get around this is to include the label value (UK, USA, China etc) in the record source.

This means defining an UPDATABLE query (IIf() results no good I'm afraid) with matching label data in each record. This would then need to be shown on the form as a TextBox, but you would probably want to ensure the TextBox control is locked from editing.
Oct 29 '08 #14

P: 1
I know this thread is old but why not set the multi-select property of a list box to simple. It is selected and unselected by clicking the option desired.

It also provides the visual clue that it is "checked" by being high lighted.

Best yet, this option works for office as far back as 97 at least.

Hope this helps.
Nov 23 '09 #15

NeoPa
Expert Mod 15k+
P: 31,186
Old threads are only really old when the subject matter is defunct. Otherwise, threads last posted to three years ago could still be getting views from anyone interested, so good for you posting if you have something you feel may help :)

Welcome to Bytes!
Nov 24 '09 #16

P: 1
@mshmyob
I must be out of my mind then.
I have a scenario right now where the checkbox would be wonderment.

I have a list of persons who are associated with an event. The person has a role for that event (or not).

I have a listbox of all the people possible, the user selects those who are associated with the event. If they care to assign a role, they can do so when that person is selected. [a "button" next to the role text field saves the assignment]
I select person A and person B. I forgot to assign the role to person A, so I click their name again... but that deselects person A. When I go to save the list, person A is no longer selected and isn't saved.

A check-listbox would be wonderful for my scenario because I could use the check to determine if the person has membership in this event, instead of the multiselect.
Apr 20 '10 #17

ADezii
Expert 5K+
P: 8,597
What you are requesting can easily be done with a Visual Basic List Box. You simply set the Style Property = 1, then every single Item in the List Box will have an associated Check Box next to it. Unfortunately, we're not using VB.
Apr 20 '10 #18

mshmyob
Expert 100+
P: 903
@supergrover
I never said that a checkbox in a listbox wouldn't be ideal. I said using the multivalue field functionality of Access2007 is not ideal. Anybody who uses multi valued fields whether in Access or Oracle, etc. obviously doesn't understand how to design a database using bridge tables (proper normalization).

By using proprietary multi valued fields your database structure is no longer portable and must be redesigned between DBMS.

cheers,
Apr 22 '10 #19

P: 1
It is an old question but here is the solution;
Set theListStyle property to 1 - frmListStyleOption then set the MultiSelect property to 1 - fmMultiSelectMulti you will have a listbox with checkboxes. So you will need only one column for your options (Checkboxes will be appeared automaticly). but this is not for Access :S
Jul 13 '12 #20

Post your reply

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