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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Employee Supervisor relationship



 
 
Thread Tools Display Modes
  #1  
Old April 7th, 2008, 04:27 PM posted to microsoft.public.access.forms
Graeme at Raptup
external usenet poster
 
Posts: 83
Default Employee Supervisor relationship

I want to create a relationship for a supervisor over an employee.
I have a table (Person) with PersonID as the PK and CompanyID_FK as the FK
to CompanyID in the table Company.
In the Relationships window I created a copy of the table Person to get
Person_1.
I have Person.SupervisorID joined to Person_1.PersonID (where the join type
is where they are both equal).
I have tried various ways of creating a combo box in a form (main form
Frm_Supervisor and subform Subform_Supervisor) so that only names of people
in that company are listed. I have added a combo box linked to SupervisorID
with the following;
SELECT Person.Person_ID, Person.[First Name], Person.[Last Name],
Person.CompanyID_FK FROM Person WHERE
(((Person.CompanyID_FK)=Forms!Frm_Supervisor!Compa nyID));
I have two problems (1) I get a pop up asking for a parameter value and (2)
it seems to get stuck on one company.
I also tried WHERE "&Me.CompanyID" but that did not work either.

Any help appreciated.
  #2  
Old April 8th, 2008, 03:23 AM posted to microsoft.public.access.forms
NetworkTrade
external usenet poster
 
Posts: 825
Default Employee Supervisor relationship

I believe you need a SupervisorID field in the Person table...so that each
employee record has a SupervisorID value.


--
NTC


"Graeme at Raptup" wrote:

I want to create a relationship for a supervisor over an employee.
I have a table (Person) with PersonID as the PK and CompanyID_FK as the FK
to CompanyID in the table Company.
In the Relationships window I created a copy of the table Person to get
Person_1.
I have Person.SupervisorID joined to Person_1.PersonID (where the join type
is where they are both equal).
I have tried various ways of creating a combo box in a form (main form
Frm_Supervisor and subform Subform_Supervisor) so that only names of people
in that company are listed. I have added a combo box linked to SupervisorID
with the following;
SELECT Person.Person_ID, Person.[First Name], Person.[Last Name],
Person.CompanyID_FK FROM Person WHERE
(((Person.CompanyID_FK)=Forms!Frm_Supervisor!Compa nyID));
I have two problems (1) I get a pop up asking for a parameter value and (2)
it seems to get stuck on one company.
I also tried WHERE "&Me.CompanyID" but that did not work either.

Any help appreciated.

 




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 07:34 PM.


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