There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen of death boot bsod computer connection crash css dell display driver drivers email error explorer firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow sound sprtcmd.exe startup trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Access: Bind to multiple fields


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
madctch's Avatar
Member with 59 posts.
 
Join Date: Jul 2004
Experience: Intermediate
17-Jul-2008, 08:58 AM #1
Solved: Access: Bind to multiple fields
Hello all,
I have a db where I have a list of projects. The projects are separated into two tables with the first containing information about the client and a related table with information pertaining to the individual projects done for each client. This is a one to many relationship.

I am currently trying to establish a resume creator for my db where I would have an employee table which would be related to individual client's projects. My goal is to create a form that I can select what projects each employee worked on and give a report on all the information given in the client and project tables for the projects any particular employee worked on.

What I cannot figure out is how to relate the employee table. I can't do it to just the client table because the employee is not on every project the client has and I cannot relate it just to the project table because I need the client information in my report as well.

Any help would be greatly appreciated,
Madctch
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
17-Jul-2008, 01:48 PM #2
Mad, you need a "many to many" table, which is really a 2 sided One to many table.
In the table you would just have the EmployeeID, the ClientID and the ProjectID.
In this way you can mix and match them as much as you like.
You bring the data together in a Query based on the many to many table and add the other tables to it to get the data like names etc.
__________________
.
.
OBP
I do not give up easily
madctch's Avatar
Member with 59 posts.
 
Join Date: Jul 2004
Experience: Intermediate
17-Jul-2008, 04:07 PM #3
Is the many to many a completely different table or is it part of the employee table and how are the relationships set up? I attached a db with a simplified version of my db if that helps.
Attached Files
File Type: zip Test.zip (11.4 KB, 2 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
18-Jul-2008, 04:43 AM #4
Mad, your "Linking Table" only actually needs the Project and Employee IDs in as you already have a link form Client to Project.
I have created some queries and forms to demonstrate how the data from the Linking table can be displayed 2 ways, the first is the "Projects" Form, this allows you to Enter or Select a Project and then Select a Client and then select as many employees in the "Linking" Subform as you want. Note that there are 2 Projects for 2 Clients, and 3 employees, only Barney Rubble appears on both projects.
Now if you look at the Employee resume form I have reversed it, you can select an Employee and see which Project(s) they have worked on. The Employee Projects Subform is using the Linking Table Query as the Employee one on the Project Form, I have just changed the Fields to show the opposite data.

If you want the Database to be "Client" orientated, rather than Project orientated then I would create a Client Mainform which has the current Project Form on it as a "Subform" and remove the Client Combo from the Project Form.
Thus you would select a Client, then project and then an employee.

I hope this makes some sense to you.
Attached Files
File Type: zip Test.zip (27.4 KB, 5 views)
__________________
.
.
OBP
I do not give up easily
madctch's Avatar
Member with 59 posts.
 
Join Date: Jul 2004
Experience: Intermediate
18-Jul-2008, 08:49 AM #5
Thanks a bunch
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:28 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.