Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thank you. It's already helped me greatly, and I enjoy just reading the inputs from the other members..."

Geography

Where in the world do Tek-Tips members come from?
LLudlow (Programmer)
29 Nov 01 11:33
I have a department table, a consultant table and a Human Rights table. Each consultant is assigned to a department. Each dept has only one consultant. Each human rights issue belongs to only one department, but each department may have more than one issue. A consultant handles the human rights issue based upon what department the issue is in. My question is that I need to place the consultants name or id in the human rights table. Can i do this by going through the department table. Other wise if i link the human rights and consultant tables directly i am going to end up with a circular relationship.
Any suggestions?



Thanks
lludlow
repete (Programmer)
1 Dec 01 23:14
I think you could get what you want using the following table structures, although this does not have your consultant id in the human rights table, you can get to it via the department table.

I have show the field names, and 3 example data records to the right of the field names for illustration.

Using these structures, the first and second issues are  controlled by the first consultant (thru the first department); and the third issue is controlled by the second consultant (thru the second department).

Am I close ??



human rights table                    
rightsid    01,02,03
rightsdesc    first issue, second issue, third issue
deptid        01,01,02
                    
department table
deptid            01,02
deptname    first department, second department
consultid    01,02
                    
consultant table
consultid    01,02
consultname     first consultant, second consultant

Pete Bloomfield
Down Under

LLudlow (Programmer)
3 Dec 01 9:09
Thanks Repete,

the post is very helpful. I am creating a form to display the contents of this database, so i can display the consultant name on the form by going through the department
table which has the consultnat id. Am i correct?

Elway
repete (Programmer)
3 Dec 01 19:17
yep, using the table structures mentioned, you can use a sql statement to get the data into a cursor to display in a form

select rightsdesc, deptname, consultname from hrtable, dtable, ctable where hrtable.deptid = dtable.deptid and dtable.consultid = ctable.consultid order by consultname into cursor curtemp

let me know if you need more explanation


Pete Bloomfield
Down Under

perrymans (IS/IT--Management)
4 Dec 01 22:16
"My question is that I need to place the consultants name or id in the human rights table."

Change the table field properties for Lookup to Combo Box. Populate with queries from the tables with ID and Name. Hide the ID column. Change field type to Number (if ID is a number). This will store the ID, but display the Name.

Sean.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close