How to create an editable combo box with boolean fields displayed as checkboxes in MS Access 2007?

I want to have an MS Access 2007 combo box that has a listing of departments and a boolean field displaying a check box where a user can select multiple depts before viewing a report?

I don't believe the current MS Access 2007 allows me to do this within its current combo box because when I see the multiple records showing the boolean field it shows -1 or 0.

Is there a way I could fake this to the user with the current Access 2007 controls that is provided?  I seen capricorn1, do cool things like put a text box over a combo box where it looks like its displaying multiple fields together as one format.  Is there a way to do so with a list box over the combo box and increase the height size of the list box once selected?  

If a listbox doesn't work perhaps overlay a subform  that has a really small datagrid form over the combo box?

Could I get a sample of how this would be possible?5

Or do I have to create an MS Access control combo box and then references that in via a .dll?   If the only way to do this is create my own MS Access 2007 control - is there a reference where I can do this?
LVL 1
stephenlecomptejrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
Combo boxes do not allow multiple selections, so I would advise against using a combo box.

List  boxes will allow you to make multiple selections (go to the Other tab) and change the multi-select tab to either simple or extended.  Although this option does not allow you to have a checkbox, it does let you select multiple items from the list, and you can test to determine which items are selected.

A third option would be to do as you commented, create a continuous subform which uses a table as its record source and has a Yes/No column and a column with the text you want to display.

A fourth option would be to use a treeview control.  Although these are a little more difficult to use, they do provide the check box functionality.

Personally, I prefer options 2 (multi-select list) and 3 (continuous subform).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stephenlecomptejrAuthor Commented:
Today I guess I'm going to have to attempt the continous subform over a combo box.  If I have trouble with it - I'll post it.

I need 2 things until I post again.

1.)
There are a lot of postings where people wish to combine fields in a textbox once a selection in a combo box is completed.  capricorn1, gave a download to one person where it game a sample of how to make the textbox on top of the combo box and it seemed if the display was in the combo box itself.

Because of so many posts on the subject I can't find that experts-exchange link.  Could someone post that again for me here?  I have that downloaded and marked on one computer that's being worked on and currently have no access to it.

2.)
I need a way to upload a sample when I'm done with it - because I'm not going to have it exactly the way I want.  If I use the link below this Post Comment / Solution and do a regular winzip file- I should be okay or would I  have to rename the Winzip file to like .zip1 for it to take the .accdb file I"m creating?
Dale FyeOwner, Developing Solutions LLCCommented:
Cannot help you with #1

2.  As far as uploading your sample.  Recommend that you do the following:

a.  Save it as an mdb (some of the experts don't have 2007 installed)
b.  Remove all unnecessary data (especially stuff that is proprietary or personal in nature)
c.  Compact the database.
d.  zip the file
d.  Click the "File" option below the comment box and upload the zipped file.  If the sample is small, most people don't even bother to zip it.
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

lee555J5Commented:
Is this the link you are looking for -- http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23156273.html?
FWIW, I would be very selective and careful with "tricks".
Lee
Rey Obrero (Capricorn1)Commented:
stephen,

1. there is not much trick there, in the afterupdate event of the combo

me.text1.setfocus
me.text1=me.combo1.column(0) & " : " & me.combo1.column(1) & " : " me.combo1.column(2)

hth..
Rey Obrero (Capricorn1)Commented:
sorry, lee
did not see your post...
lee555J5Commented:
That's ok, I like posting your stuff before you do. ;-)
This "trick" seems ok, and it may be ok. I have never tried it, but it looks pretty slick. However, I have gotten into trouble before with a UI trick or two. It can be very sneaky trouble too--hard to find.
Lee
stephenlecomptejrAuthor Commented:
Here's a sample that I"m starting up.  I have to go somewhere now but later after lunchtime I will attempt to add the subform.  All I need is department name and Show as a check box versus the -1 and 0s shown in the combo box.  If someone can try please do.
TowerIII.mdb
stephenlecomptejrAuthor Commented:
What I was hoping for was making the subform the same height as the combo box and when they click on the down arrow of the combo box the subform becomes visible and expands taller and wider to the left.   The border around it would be adjusted to seem as if the combo box was opening up instead of the continous subform.
stephenlecomptejrAuthor Commented:
OK this is what I've got so far -

I need help with making it look better.

1.) The dark blue is too dark!  I want to go with a lighter blue.
2.) I don't know what property would keep the combo box from appearing when the down area is clicked.
3.) I don't know what action I can incorporate that when the mouse is moved away from the subform that it goes away like a combo box.
4.) Please note my attempt to do a Show All - I plan to ask another question later that will ask to me this more efficient after I complete this task!

The link provided above does not take me to the one where capricorn provided a downloadable sample

Thank you sincerely for all your help thus far!.

Is there another way I can upload a file?  I keep selecting my new one as Editable combo box.mdb but yet the computer still keeps putting the old TowerIII.mdb?  I can't see what you guys see on your end?  But this time the .mdb comes up with a form with the combo box and subform over it... Please let me know if you don't see it.
TowerIII.mdb
stephenlecomptejrAuthor Commented:
Never mind I see that it loaded - seems to be glitch giving the same .mdb names as the previous uploaded file.
stephenlecomptejrAuthor Commented:
2.) I don't what property would keep the combo box from appearing when the down arrow is clicked?
stephenlecomptejrAuthor Commented:
Please inform me what settings I need to change instead of just the file back... because I want to build more on top of more tabs.
stephenlecomptejrAuthor Commented:
I would rather also not have Department and Show at the top of the control box.  I couldn't figure out how to remove it so that I would then show field headers which would have been more thin in height to fall in line with a more combo box feel.
stephenlecomptejrAuthor Commented:
Please help me further with this question at -
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_25934200.html?fromWizard=true

Since I"ve got it going but still a bit of a write conflict.
stephenlecomptejrAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.