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  

Cross Reference two lookup columns



 
 
Thread Tools Display Modes
  #1  
Old September 13th, 2009, 01:48 PM posted to microsoft.public.access.tablesdbdesign
Ken Snell MVP
external usenet poster
 
Posts: 275
Default Cross Reference two lookup columns

I'd suggest a table with these data fields:

ProviderID (foreign key to Providers table)
CityID (foreign key to Cities table)
ServiceID (foreign key to Services table)

One record for each combination of a provider in one city with one service.
If a provider has three services in one city, three records. If a provider
has one service each in three cities, three records.

This also allows you to use this table structure as you add cities and add
services, without having to add fields to the table.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"krumlov" u54746@uwe wrote in message news:9c0bb59aaecfa@uwe...
I am working on a 2007 database of service providers in different cities.
I
have separate tables for services, cities and providers. In the provider
table I have two lookup columns pointing back to services and cities, to
show
the services one offers and in which cities they operate.

The issue is that a provider won't offer all of their services in every
city
the operate in. I need a way to cross reference the cities list with the
services list, and create a new field to hold a yes\no entry for a given
service in a given city.

I am wondering what my options are and what the best way to do this is.
Should I create a new table that queries the lookup columns (for all I
guess)
and then use the queries to provide lookup data for a field back in the
provider table? That (if it would even work) would give my "service in a
given city" data two numeric lookup values which is fine, but should I be
doing yes\no? I eventually want to have a form with check boxes that I
can
use to input or display the data like below. Anyone have any suggestions
on
how to proceed?

[Services]
[Cities] (both lookup columns in same table)
| Phone | Internet | AV | LAN | WAN |
Atlanta x x
Boston x x
Chicago x x x x
Cincinnati x x
Dallas x x x x x





 




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


All times are GMT +1. The time now is 04:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.