473,499 Members | 1,551 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 1435
Looks like you need a set of three tables creating a many-to-many
relationship:

Employees 1 --> oo EmployesToClientsIndex oo <-- 1 Clients

Employees in the Employee table, clients in the client table. Store the
date of the meeting in the EmployeesToClientsIndex 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
EmployeesToClientsIndex table as your unique index. To display the data,
you need to use a crosstab query.

Hope this helps.

-DC Fan

"No Spam" <no****@earthlink.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 #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.............Client 1..............Client 1..............Client 2
.......................Client 2..............Client 3.................
.......................Client 3

Mary X...........Client 3..............Client 1.................
.................................................C lient 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 EmployesToClientsIndex oo <-- 1 Clients

Employees in the Employee table, clients in the client table. Store the
date of the meeting in the EmployeesToClientsIndex 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
EmployeesToClientsIndex table as your unique index. To display the data,
you need to use a crosstab query.

Hope this helps.

-DC Fan

"No Spam" <no****@earthlink.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
2581
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...
1
4557
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...
3
11342
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...
3
11682
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
1990
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...
15
2684
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
1540
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...
5
3814
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...
4
5097
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...
9
1513
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
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
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...
0
5468
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,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
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...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
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 ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.