Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with multiple people viewing time sheets.

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I have a subform linked to a main form by Manager and WeekEndDate
We had only two managers who reviewed timesheets for only their people.
So when each manager logged in and the sub form showed just their people.
Now we have a new VP who wants to see everyone’s time sheet. But still need the original managers to see just their people when they log in. so if I change the Manager to the VP’s name then the manager can’t see anything.
Does that make sense?
Any ideas


DougP
 
Use a criteria like this:
WHERE [manager field]=loggedManager OR loggedManager=newVP

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I guess the problem is the subform is linked to the main form using the subforms Master and Child linked properties. There is no Code to connect it. Do I need to unlink it from the properties and write the link using code? I have only one name in the Manager column for each employee. the Employee table needs 2 Manager columns?
here is what I have now
Emplname Manager
Fred Tom
Gary Tom
Sue Jon
Lisa Jon
Doug Tom

Tom needs to see everyone but Jon needs to see only his two people.

DougP
 
Howdy DougP . . .

How are you currently determining who opened the form?

Also your post dated [blue]3 Jun 08 14:02 [/blue], is in a badly un-normalized state. As a view of fixing this, the following table structure would do:

[tt][blue]tblManagers
***********
[/blue]
[blue]MgrID[/blue] as Long, PrimaryKey
[blue]MgrName[/blue] as Text
OtherFields

[blue]tblEmployees
************
[/blue]
[blue]EmpID[/blue] as Long, PrimaryKey
[blue]MgrID[/blue] as Long, ForeignKey to tblManagers.MgrID
[blue]EmpName[/blue] as Text
OtherFields[/tt]

With this structure you could add as many managers/VP's/WhoEver you like and it would be easy to transfer employees to other managers.

In any case, [blue]manipilating the criteria of a query or SQL[/blue] is a good way to go (already stipulated by [blue]PHV[/blue]).

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top