473,473 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

select multiple values from a combo box

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
4 6094
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
2
by: Jen F. | last post by:
I have inherited a medical database in which there are multiple values stored in a single field (ie. "Current Conditions" field might contain 1-20 different conditions, separated by comma (ie....
2
by: DC Gringo | last post by:
I have two listboxes, the first of which is an autopostback=true that allows multiple row selection. When I select multiple values (by holding down CTL) in the first one, it should query the...
1
by: sverdlov | last post by:
Hi all, I have, let's say, 1 column called Payment_type. In the column, there are 6 types of values: 1, 2, 3, 4, 5, 6, like in --------------------------------- Payment_type |...
1
by: ykong1214 | last post by:
In my project, there is a single select tag, <html:select property="userName" size="7"> <html:options collection="UserList" property="value" labelProperty="label" /> </html:select> ...
2
by: billa856 | last post by:
Hi, My Project is in MS Access. In that I have one form in which I have some textboxes,comboboxes and listboxes. Now when I select value from 1st combobox(CustomerID) then it wil generate list for...
5
by: sarayu | last post by:
Hi All, How can i select multiple values in a form without using options.I want to select more than one image from a table and submit those selected values as a request to the next page.I don't...
3
by: jeremyjcochran | last post by:
I am writing a code for a shopping cart, the customer selects the color, which also has the price. I want to send the color and the price to "price" and "color" on the mysql server. How do I code a...
2
by: MicaK | last post by:
Good Morning, I am new to this forum, and extremely new to VBA, so there may be a very simple explanation to this. I also apologize if I am giving you and excessive amount of detail. I have a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.