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

select multiple values from a combo box

P: n/a
LD
Is there a way in Access to store more than one value in a field that has
been selected from a combo box?

For example, if a combo box had three values that you can select, "One",
"Two", and "Three". How do you drop down the list and select a first value
("One") then do the same and select a second value ("Two") so that the value
in the field is now "One, Two". I have situations where I need to do this
with fields that

If there is a better way to do this rather than a combo box?
Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
LD
I am sorry, I did complete a sentence in this message. Here is the post
again:
Is there a way in Access to store more than one value in a field that has
been selected from a combo box?

For example, if a combo box had three values that you can select, "One",
"Two", and "Three". How do you drop down the list and select a first value
("One") then do the same and select a second value ("Two") so that the value
in the field is now "One, Two". I have situations where I need to do this
with fields that with both a "value list" and with a query to other tables.

If there is a better way to do this rather than a combo box?

Nov 17 '05 #2

P: n/a
If you feel compelled to use "multi-valued fields" (a violation of good
relational database design practices), you would have to use VBA code set
the value... that could be done easily enough with a Text Box bound to the
field, and an unbound Combo Box with code that would append the selected
values to the end of the text string in the Text Box. But, I caution that
you may make more work for yourself when you later need to use that field...
for example, in queries.

Larry Linson
Microsoft Access MVP

"LD" <wa*********@yahoo.com> wrote in message
news:dl**********@murdoch.acc.Virginia.EDU...
I am sorry, I did complete a sentence in this message. Here is the post
again:
Is there a way in Access to store more than one value in a field that has
been selected from a combo box?

For example, if a combo box had three values that you can select, "One",
"Two", and "Three". How do you drop down the list and select a first value
("One") then do the same and select a second value ("Two") so that the
value
in the field is now "One, Two". I have situations where I need to do this
with fields that with both a "value list" and with a query to other
tables.

If there is a better way to do this rather than a combo box?

Nov 17 '05 #3

P: n/a
LD
Thanks Larry. I do not expect any queries created in the future will
include criteria for this field. I am creating a computer job database.
Three of the fields are "Run Day", "Input" and "Output". There are a
limited number of input files and output destinations but each job can
contain one or more run days, input files, and output files.

Thank you for your help.
Lloyd

"Larry Linson" <bo*****@localhost.not> wrote in message
news:nT5ff.27813$9T4.14418@trnddc04...
If you feel compelled to use "multi-valued fields" (a violation of good
relational database design practices), you would have to use VBA code set
the value... that could be done easily enough with a Text Box bound to the
field, and an unbound Combo Box with code that would append the selected
values to the end of the text string in the Text Box. But, I caution that
you may make more work for yourself when you later need to use that
field... for example, in queries.

Larry Linson
Microsoft Access MVP

"LD" <wa*********@yahoo.com> wrote in message
news:dl**********@murdoch.acc.Virginia.EDU...
I am sorry, I did complete a sentence in this message. Here is the post
again:
Is there a way in Access to store more than one value in a field that has
been selected from a combo box?

For example, if a combo box had three values that you can select, "One",
"Two", and "Three". How do you drop down the list and select a first
value
("One") then do the same and select a second value ("Two") so that the
value
in the field is now "One, Two". I have situations where I need to do
this
with fields that with both a "value list" and with a query to other
tables.

If there is a better way to do this rather than a combo box?


Nov 17 '05 #4

P: n/a
On Thu, 17 Nov 2005 15:25:45 -0500, LD wrote:
I am sorry, I did complete a sentence in this message. Here is the post
again:
Is there a way in Access to store more than one value in a field that has
been selected from a combo box?

For example, if a combo box had three values that you can select, "One",
"Two", and "Three". How do you drop down the list and select a first value
("One") then do the same and select a second value ("Two") so that the value
in the field is now "One, Two". I have situations where I need to do this
with fields that with both a "value list" and with a query to other tables.

If there is a better way to do this rather than a combo box?


It's not a good idea, but if you must .....
Add a regular text control to your form, bound to the field you wish
to store the data in.
Code the Combo AfterUpdate event:
Me![ControlName] = Me![ControlName] & ", " & Me.[ComboName]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.