A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multi Value Combo Boxes



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 06:32 PM posted to microsoft.public.access.forms
Rich Locus
external usenet poster
 
Posts: 9
Default Multi Value Combo Boxes

Hello:

One of the new features of Access 2007 (sometimes criticized) is the ability
to create a table field as "Allow Multiple Values" using the Lookup Wizard
when specifying the data type. This shows the values with a checkbox and
allows the user to select multiple items (i.e. select CA, OR, WA as states in
which a business resides).

I was hoping to just define a table field as Text and then create the "Allow
Multiple Values" when creating a combo-box on the form. The form wizard does
not seem to create the same objects as when doing it in table design mode.

So, unless someone knows how to create these "Many to Many Under the Cover"
relationships in forms, I will probably have to do that functionality in the
table design mode.

I am familiar with the usual list box ability to select multiple items into
a collection, but that is available in Access 2003. This new feature is only
in 2007, and I'm not sure how to invoke it from a form.

Ideas?

--
Rich Locus
Logicwurks, LLC
  #2  
Old June 1st, 2010, 06:51 PM posted to microsoft.public.access.forms
Albert D. Kallal
external usenet poster
 
Posts: 2,874
Default Multi Value Combo Boxes

The issue here is that you can use a list box or a sub-form to create a
classic relationship.

You don't unfortunate have the same user interface control (I wish they put
that new control in the design tool box).

In the case of a multi-select list box, you can create a very similar
looking effect by creating a sub-form with two columns, one a check box, the
other text.

Take a look at the screen shots here, the 1st form has what looks like two
list boxes, but on the right is a sub-form with a check box.

http://www.members.shaw.ca/AlbertKal...icles/Grid.htm

For a multi-value combo box with a drop down of check boxes one could launch
a small popup form with the above continues form (or data sheet) idea. So
you can create a fairly close interface here, but I do wish that new control
was exposed for our use. I quite like it....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada



  #3  
Old June 1st, 2010, 07:23 PM posted to microsoft.public.access.forms
Rich Locus
external usenet poster
 
Posts: 9
Default Multi Value Combo Boxes

Albert:

Thanks for the great suggestions!

Let's assume my parent table is a table of businesses. My child table is
the states in which they reside.

To use the sub-form approach, it seems I would define my "States" table as
the source of the sub-form, and each line in the states table would point
back to the main table using a foreign key.

So, if the main table had two records, key 200 and 201, then the States
table would look something like this:

CA 200
OR 200
WA 200
NY 200

CA 201
MN 201
AZ 201

And so on.

Does this seem reasonable?

--
Rich Locus
Logicwurks, LLC


"Albert D. Kallal" wrote:

The issue here is that you can use a list box or a sub-form to create a
classic relationship.

You don't unfortunate have the same user interface control (I wish they put
that new control in the design tool box).

In the case of a multi-select list box, you can create a very similar
looking effect by creating a sub-form with two columns, one a check box, the
other text.

Take a look at the screen shots here, the 1st form has what looks like two
list boxes, but on the right is a sub-form with a check box.

http://www.members.shaw.ca/AlbertKal...icles/Grid.htm

For a multi-value combo box with a drop down of check boxes one could launch
a small popup form with the above continues form (or data sheet) idea. So
you can create a fairly close interface here, but I do wish that new control
was exposed for our use. I quite like it....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada



  #4  
Old June 1st, 2010, 07:44 PM posted to microsoft.public.access.forms
Albert D. Kallal
external usenet poster
 
Posts: 2,874
Default Multi Value Combo Boxes


"Rich Locus" wrote in message
...
Albert:
So, if the main table had two records, key 200 and 201, then the States
table would look something like this:

CA 200
OR 200
WA 200
NY 200

CA 201
MN 201
AZ 201

And so on.

Does this seem reasonable?


You are right on the money. The issue is that the proper relation would say
to use a sub-form. that sub-form would likely have the FK (foreign key) as
standard long value column. (the above column to hold the 200 and 201 in
your example). The combo box would have to be feed by a either a value list,
or better yet a table that holds all of the state abbriviations. The user
could type in the state, but clearing a combo box is much easier. Because a
sub-form always shows an extra line, then the user would click on combo box,
select state, then click on the next new line combo box below and again
select sate. it goes quite fast, but it still not quite as nice as that
built in check box. If your list is not long, say only about 10 choices,
then a un-bound listbox with code behind to "toggle" or highlight or un-high
the selections works well. You can see a screen shot of that he

the 4th screen shot here shows this:
http://www.members.shaw.ca/AlbertKal...erFriendly.htm

However, for 4-5, then that new cool built in combo works well. However, for
50 states, it actually quite HARD to scroll and select. I think the combo
box idea above in a sub-form will actually be faster, and the user would
have a choice of 100% keyboard. if you setup the record cycle settings
correct, then the user can hit tab, and type in the state in addition to
using the mouse clicks. So, in your case because this is a long list of
states, a standard combo box likely is better then the multi select combo
box (it too hard to scroll through the long list to just select one state).

Keep in mind that the table of states that drives the combo box is just a
table to save the user some time typing

So, you have your main table, then

tableListOfStates the above table and example you talking about.

And, then the optional 3 table to drive the combo box if you choose to have
a combo box in place of the user typing in the state name. (but, user could
use combo drop down, or just type right into that combo box).

Remember, those combo boxes work well in continues sub-forms as the "grid"
link in the previous post shows.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada



  #5  
Old June 2nd, 2010, 02:01 AM posted to microsoft.public.access.forms
Rich Locus
external usenet poster
 
Posts: 9
Default Multi Value Combo Boxes

Albert:
Thanks again for taking the time to provide such a thorough solution.
Regards,

--
Rich Locus
Logicwurks, LLC


"Albert D. Kallal" wrote:


"Rich Locus" wrote in message
...
Albert:
So, if the main table had two records, key 200 and 201, then the States
table would look something like this:

CA 200
OR 200
WA 200
NY 200

CA 201
MN 201
AZ 201

And so on.

Does this seem reasonable?


You are right on the money. The issue is that the proper relation would say
to use a sub-form. that sub-form would likely have the FK (foreign key) as
standard long value column. (the above column to hold the 200 and 201 in
your example). The combo box would have to be feed by a either a value list,
or better yet a table that holds all of the state abbriviations. The user
could type in the state, but clearing a combo box is much easier. Because a
sub-form always shows an extra line, then the user would click on combo box,
select state, then click on the next new line combo box below and again
select sate. it goes quite fast, but it still not quite as nice as that
built in check box. If your list is not long, say only about 10 choices,
then a un-bound listbox with code behind to "toggle" or highlight or un-high
the selections works well. You can see a screen shot of that he

the 4th screen shot here shows this:
http://www.members.shaw.ca/AlbertKal...erFriendly.htm

However, for 4-5, then that new cool built in combo works well. However, for
50 states, it actually quite HARD to scroll and select. I think the combo
box idea above in a sub-form will actually be faster, and the user would
have a choice of 100% keyboard. if you setup the record cycle settings
correct, then the user can hit tab, and type in the state in addition to
using the mouse clicks. So, in your case because this is a long list of
states, a standard combo box likely is better then the multi select combo
box (it too hard to scroll through the long list to just select one state).

Keep in mind that the table of states that drives the combo box is just a
table to save the user some time typing

So, you have your main table, then

tableListOfStates the above table and example you talking about.

And, then the optional 3 table to drive the combo box if you choose to have
a combo box in place of the user typing in the state name. (but, user could
use combo drop down, or just type right into that combo box).

Remember, those combo boxes work well in continues sub-forms as the "grid"
link in the previous post shows.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.