Access 2003 Combo Box: Can I allow multiple values?

A

Ailish

Hi,

I want to enable a user to select more than one item from a combo box. Is
there a way to do this in Access 2003?

Thanks in advance for any help you can offer.
 
D

Duane Hookom

No. List boxes offer multi-select functionality.

Can we assume you aren't attempting to store multiple values in a single
field?
 
A

Ailish

Can we assume you aren't attempting to store multiple values in a single
field?

Hi Duane,

I probably am attempting that but I'm not sure - I'm new at this and it
probably shows.

I'm a nurse, working for a charity hospice. I'm trying to design a database
table and form that can be updated daily with patient information for
oncoming staff.

The field is named Syringe Driver and I need people to be able to enter two
or more drug names as there is usually a combination of drugs in one syringe.
I assigned a combo box control referring to a table of drugs we commonly
use. But it will only select one drug.

I have tried using Shift and Ctrl. I have also tried using a List Box
instead of Combo but none of them enable me to select more than one item. Is
it not possible?

I'm using Access 2003. A search brought up a tutorial that suggests it can
be done with Access 2007 but I don't know if our organisation has that
version. I'm on night shift right now so there is nobody to ask.

Thanks
 
S

strive4peace

Hi Ailish,

instead of storing the Drug in your table, store SyrDrivID as a Long
Integer and set up these tables to define what goes into it:

SyringeDrivers
- SyrDrivID, autonumber, PK
- SyringeDriver, text -- for a verbal description

Drugs
- DrugID, autonumber, PK
- DrugName, text

SyringeDrivDrugs
- SyrDrivDrugID, autonumber
- SyrDrivID, long integer -- FK to SyringeDrivers
- DrugID, long integer, FK to Drugs
- DrugAmt, number, double (dug amount in cc's or however you measure it)

This way, you can have one or many drugs in a syringe and specify the
amounts as well

In the table you are talking about, you would store SyrDrivID as a Long
Integer and display SyringeDriver to the user

how to do this: make a combobox:

Name --> SyrDrivID
ControlSource --> SyrDrivID
Rowsource --> SELECT SyrDrivID, SyringeDriver
FROM SyringeDrivers
ORDER BY SyringeDriver

ColumnCount --> 2
ColumnWidths --> 0;2
ListWidth --> 2.2 (sum of column widths + 0.2" for scrollbar)


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
K

Ken Snell \(MVP\)

Ailish said:
I have tried using Shift and Ctrl. I have also tried using a List Box
instead of Combo but none of them enable me to select more than one item.
Is
it not possible?

Look at the Multi Select property for the listbox control (it's on Other tab
in Properties window). That property must be set to Simple (to allow use of
Ctrl+LeftClick) or to Extended (to allow use of Ctrl+LeftClick and
Shift+LeftClick).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top