Re: load a filtered form based on user login

Tech-Archive recommends: Fix windows errors by optimizing your registry



Joan,

Thanks for your reply. I am glad to hear from you for I am new to access as
well as access monster and as I read through the various forums I find you
very knowledgeable.

Let me explain in detail what goes on with this db.

On my switchboard there is a command button to enter time which launches the
Time*** form in add mode. The employee selects his name from a drop down
and enters a start and end date to reflect their biweekly time. They then
enter their details of a workday in a subform entitled Time*** Hours. After
order entry their is a button on the form that opens a report which allows
for printing. The recordsource for this form is a table entitled Time***.

Their is also a button on the switchboard that allows them to view/edit their
time*** in the event they come across an error once they have printed their
time***.

of course, it is when they view/edit their time*** is when i need the form
to open for them to view just their time log.

I created a query with the criteria for EmployeeID=CurrentUser() and changed
the recordsource to match the
query so when I click the command button on the switchborad to edit/view
time*** it opens based on the user. However when I click the button to
enter time the form doesn't load because by changing the recordsource to
match the query it affected Time*** in add mode.

Also, I need the supervisors to be able to view all the records not just
theirs and with employeeID=currentuser that limits their view also.

I hope I clarified this, please help me it is driving me crazy

Najah


Joan Wild wrote:
If you are using the built-in security then set the record source of the
Time*** form to
a query where the criteria under EmployeeID is =CurrentUser()

Thanks Shane,

[quoted text clipped - 32 lines]
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-tablesdbdesign/200608/1

--
Message posted via http://www.accessmonster.com

.


Quantcast