Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2007, 04:15 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Values In One Field

I have a business database. I have it in access. At this point it is a flat database. It has business name, address, phone and Category.

I created a few tables.
MainCat: Let say a value in this would be Retail.
SubCats: Let say a value in this would be Stores.
Cat: Let say a value in this would be Pet Stores.

They are all linked by lookup fields.

I have a few questions:
1. My category field in my database might look like this:
Joes Pet Shop
12 Some ST
Somepalce, UT, 12345
555-555-1212
Pet Store, Animal Feed Store, Pet Supplies, Stores

So basically I was thinking of converting the Alpha cats to the numeric equivalent in the tables to do a lookup instead of storing all the values in the table.

Can this be done and how?

Thanks in advance for your help
 
Old December 12th, 2007, 08:59 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure what you are asking here. What is the relationship between the tables currently? If one store is capable of having more than one type, then you will want a junction table between your category tables and your business table. Currently this is not flat.

tblCategory
CatID
Category

tblBusiness
BusinessID
BName
BAddress1
BAddress2
BCity
...

tblCat_Bus
CatBusID
BusinessID - FK
CategoryID - FK
...

This will allow you to have n number of associations between your business and category structure. Then you reporting can show the categories associated with each business as needed.

Is this what you were talking about?

mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
find multiple values from a table field raaj Beginning PHP 0 September 17th, 2007 03:51 AM
multiple values insert into one field mateenmohd Classic ASP Basics 0 May 29th, 2007 02:11 AM
get the values of form field values crmpicco Perl 2 March 16th, 2007 10:57 AM
Adding multiple form field values to database cdenequolo Classic ASP Basics 1 August 17th, 2004 05:38 PM
multiple values in an access field katie456 Access 11 October 23rd, 2003 08:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.