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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I select and store multiple values from a lookup list



 
 
Thread Tools Display Modes
  #1  
Old November 12th, 2004, 08:58 PM
Mike A
external usenet poster
 
Posts: n/a
Default How do I select and store multiple values from a lookup list

How do I select and store multiple values from a lookup list
  #2  
Old November 13th, 2004, 04:34 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

If you mean you want to store them in a single field, you really shouldn't
(it's a violation of database normalization principles to have more than one
value in a single field)

What you should have is two tables: one containing the main record, and one
containing as many rows as there are objects in the lookup list, each with a
foreign key pointing back to the related main record.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Mike A" Mike wrote in message
...
How do I select and store multiple values from a lookup list



  #3  
Old November 13th, 2004, 12:43 PM
Mike
external usenet poster
 
Posts: n/a
Default

Actually I already have the lookup table set up as you suggest. What I want
to do now is have a field that will hold multiple values selected from the
lookup table. This is for ad run dates for a publication. We need to be
able to select multiple individual dates for a specific ad to run and would
prefer to select multiple dates at once as opposed to having each date take
up an individual field. THANKS

"Douglas J. Steele" wrote:

If you mean you want to store them in a single field, you really shouldn't
(it's a violation of database normalization principles to have more than one
value in a single field)

What you should have is two tables: one containing the main record, and one
containing as many rows as there are objects in the lookup list, each with a
foreign key pointing back to the related main record.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Mike A" Mike wrote in message
...
How do I select and store multiple values from a lookup list




  #4  
Old November 13th, 2004, 01:03 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

Store it in separate fields, and then have a function such as what's given
in http://www.mvps.org/access/modules/mdl0004.htm or
http://www.mvps.org/access/modules/mdl0008.htm at "The Access Web" for
reporting purposes.

It's far better to have your data stored correctly, rather than compromising
the design for a specific use.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Mike" wrote in message
...
Actually I already have the lookup table set up as you suggest. What I

want
to do now is have a field that will hold multiple values selected from the
lookup table. This is for ad run dates for a publication. We need to be
able to select multiple individual dates for a specific ad to run and

would
prefer to select multiple dates at once as opposed to having each date

take
up an individual field. THANKS

"Douglas J. Steele" wrote:

If you mean you want to store them in a single field, you really

shouldn't
(it's a violation of database normalization principles to have more than

one
value in a single field)

What you should have is two tables: one containing the main record, and

one
containing as many rows as there are objects in the lookup list, each

with a
foreign key pointing back to the related main record.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Mike A" Mike wrote in message
...
How do I select and store multiple values from a lookup list






  #5  
Old November 13th, 2004, 02:19 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

On Sat, 13 Nov 2004 04:43:03 -0800, Mike wrote:

Actually I already have the lookup table set up as you suggest. What I want
to do now is have a field that will hold multiple values selected from the
lookup table. This is for ad run dates for a publication. We need to be
able to select multiple individual dates for a specific ad to run and would
prefer to select multiple dates at once as opposed to having each date take
up an individual field. THANKS


Read Douglas' reply again. He is not talking about a separate "lookup
table". He is talking about a separate table to store the "entries" (you
need 3 tables).

The most common example is an order form. One table for the main data
(customer, date, order number, etc.) and another table for the items
ordered. You wouldn't have an order form with just one big memo field to
contain the list of items ordered. You have a separate table with a
separate form (usually embedded in a subform). That way each "order" can
have from zero to (however many) items associated with it.

Your dates should be handled the same way.



--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

  #6  
Old November 15th, 2004, 01:04 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Sat, 13 Nov 2004 04:43:03 -0800, "Mike"
wrote:

Actually I already have the lookup table set up as you suggest. What I want
to do now is have a field that will hold multiple values selected from the
lookup table. This is for ad run dates for a publication. We need to be
able to select multiple individual dates for a specific ad to run and would
prefer to select multiple dates at once as opposed to having each date take
up an individual field. THANKS

Just to reemphasise Douglas' and Rick's suggestions:

Don't store multiple dates in one field.
Don't store multiple dates in one record *either*.
Store each run date in a NEW RECORD of an additional table, AdRunDates
say. If the ad is to run six times, this table would have six records
for that ad.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
list box doesn't store the selected value until closing the form Lin Using Forms 2 November 3rd, 2004 05:34 PM
Select Multiple Values in one Combo Box? Paul General Discussion 3 August 16th, 2004 05:51 PM
multiple values in listbox or combo box? TracyG General Discussion 4 June 7th, 2004 07:21 AM
Select Multiple Values in Dropdown Box (Validation List) Tom Worksheet Functions 5 April 9th, 2004 03:24 AM


All times are GMT +1. The time now is 09:16 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.