473,789 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table Relation Question

To fellow Access 2K users:

I have run into a newbie situation where I have been assigned to
create an Access database to act as a schedule. Basically, it is a
very simple setup: the end product is an Excel like grid that needs
to have:

* The periods along the top of the grid (which are weekly periods)
* The names of the emploees along the left
* The clients in the body of the grid

Here's a sample:
Name: Feb 9-13 Feb 16-20 Feb 23-27
*************** *************** *************** *************** *************** **********
Joe X Client X Client Y
Client Z
Client Y Client Z
Client X

Bob X Client Z Client X
Client Y
Client X

My main concern is that there can be more than one client for a weekly
period for an employee.

Can anyone please help me set up the tables (relationships and key
fields)? Thanks a million in advance!

Kevin
Nov 12 '05 #1
2 1448
Looks like you need a set of three tables creating a many-to-many
relationship:

Employees 1 --> oo EmployesToClien tsIndex oo <-- 1 Clients

Employees in the Employee table, clients in the client table. Store the
date of the meeting in the EmployeesToClie ntsIndex table along with the
foreign references to the employee ID and the client ID. If one employee
can't meet with one client more then once on the same day, then the
combination of the employee, client and date becomes your unique index. If
they *can* meet with a client more then once in a day, you proabably want to
create a PrimaryKey that is some sort of autonumber "meeting ID" in the
EmployeesToClie ntsIndex table as your unique index. To display the data,
you need to use a crosstab query.

Hope this helps.

-DC Fan

"No Spam" <no****@earthli nk.net> wrote in message
news:cm******** *************** *********@4ax.c om...
To fellow Access 2K users:

I have run into a newbie situation where I have been assigned to
create an Access database to act as a schedule. Basically, it is a
very simple setup: the end product is an Excel like grid that needs
to have:

* The periods along the top of the grid (which are weekly periods)
* The names of the emploees along the left
* The clients in the body of the grid

Here's a sample:
Name: Feb 9-13 Feb 16-20 Feb 23-27
*************** *************** *************** *************** *************** *
********* Joe X Client X Client Y
Client Z
Client Y Client Z
Client X

Bob X Client Z Client X
Client Y
Client X

My main concern is that there can be more than one client for a weekly
period for an employee.

Can anyone please help me set up the tables (relationships and key
fields)? Thanks a million in advance!

Kevin

Nov 12 '05 #2
The table structure worked great! However, displaying it is another
story. When I created a crosstab query, it appears as though I can
only display count, max, etc. of my clients. Is there any way to
display the employee names along the left, the periods along the top,
and the clients in the "grid" or body? Thanks!

Name........... .Period 1.............. Period 2.............. Period 3
*************** *************** *************** *************** *********
Joe X.............C lient 1.............. Client 1.............. Client 2
............... ........Client 2.............. Client 3.............. ...
............... ........Client 3

Mary X...........Cli ent 3.............. Client 1.............. ...
............... ............... ............... ....Client 3.............
Kevin


On Wed, 11 Feb 2004 11:14:12 -0500, "DC Fan"
<gr************ *******@comcast .net> wrote:
Looks like you need a set of three tables creating a many-to-many
relationship :

Employees 1 --> oo EmployesToClien tsIndex oo <-- 1 Clients

Employees in the Employee table, clients in the client table. Store the
date of the meeting in the EmployeesToClie ntsIndex table along with the
foreign references to the employee ID and the client ID. If one employee
can't meet with one client more then once on the same day, then the
combination of the employee, client and date becomes your unique index. If
they *can* meet with a client more then once in a day, you proabably want to
create a PrimaryKey that is some sort of autonumber "meeting ID" in the
EmployeesToCli entsIndex table as your unique index. To display the data,
you need to use a crosstab query.

Hope this helps.

-DC Fan

"No Spam" <no****@earthli nk.net> wrote in message
news:cm******* *************** **********@4ax. com...
To fellow Access 2K users:

I have run into a newbie situation where I have been assigned to
create an Access database to act as a schedule. Basically, it is a
very simple setup: the end product is an Excel like grid that needs
to have:

* The periods along the top of the grid (which are weekly periods)
* The names of the emploees along the left
* The clients in the body of the grid

Here's a sample:
Name: Feb 9-13 Feb 16-20 Feb 23-27

************** *************** *************** *************** *************** **
*********
Joe X Client X Client Y
Client Z
Client Y Client Z
Client X

Bob X Client Z Client X
Client Y
Client X

My main concern is that there can be more than one client for a weekly
period for an employee.

Can anyone please help me set up the tables (relationships and key
fields)? Thanks a million in advance!

Kevin


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2597
by: Tetsuji Ueda | last post by:
Hello, I'm currently porting an application using some other DB to MySQL. The database in question has several tables with foreign key relations. The application is written such that, on table INSERTs, if a foreign key relation is violated, the error message is parsed for the particular relation that is violated. As a simple example, say we have the tables: create table mother (mother_id int primary key);
1
4577
by: Juris Krumins | last post by:
Couple a weeks ago (19.08.03 Subject: Temporaty tables) I've posted message with question about errors I'm getting while using create temporaty table command. So I'm start digging in src code as Tom Lane did and found about 4 places where such kind pf errors could happend PostgreSQL 7.3.3 src/backend/catalog/dependency.c : 1621 src/backend/catalog/heap.c : 1663
3
11386
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when building the database: 3:ERROR: table "country" does not exist 6:ERROR: table "customer" does not exist 11:ERROR: table "product" does not exist 15:ERROR: table "license" does not exist 19:ERROR: table "enduser" does not exist 24:ERROR: ...
3
11734
by: GGerard | last post by:
Hello Does anyone know if it is possible with Access 2000 to create relationships between tables using code? Thanks G.Gerard
5
2005
by: salimshahzad | last post by:
dear respected sir, i have so much strange behavior of access queries using through VBA codes here is the structure of tables - tblMaster(where PK is PolicNo) - tblDetails so there is 1-TO-many relation between above tables. when the policy
15
2736
by: Hi5 | last post by:
Hi, I am designing a database for a client in which It has a client table including the followings: 1-Table Client 2-Table lookupcategory 3-Table Ctegory
5
1551
by: Regnab | last post by:
I have a table "tblSprayApplication" in a project for a nursery. Each record refers to a single spray application across the nursery, recording which groups had been sprayed. Multiple applications (in different parts of the greenhouse) can occur targetting the same set of pests. My question is how should I best record this? Originally I was going to have just the two tables recording the pests targetted for each application. However, there...
5
3847
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big table, we try separate this big table into twelve tables and create a view
4
5113
bugboy
by: bugboy | last post by:
I'm inserting a new word into table 'w' and a definition into table 'c' which are linked in table 's' which is the relation table for the many to many relationship between 'w' and 'c'. I've been passed 2 variables from a form; $word and $def and i'm inserting them ok but i'm having trouble getting and passing on their ID's in order to insert them into the relation table 's' I've checked every query and they all work individually, so i...
9
1537
by: Miro | last post by:
VS2008 I have created 3 tables. Vendors Customers PhoneNumbers each have their own key Vendor has: VendorID - int unique identifier Customer has: CustomerID - int unique identifier
0
9663
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9979
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
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.