Form filters in a multiuser environment

  • Thread starter najah via AccessMonster.com
  • Start date
N

najah via AccessMonster.com

Hey all,
I've designed a database to track the time and tasks of 9 employees. I've
created a form that allows them to enter their time and detailed task.

I've also created various queries, in order to generate bi weekly reports.
Initially, this was a simple task, however towards the end It started
becoming a complex job.

I created a switchboard, via switchboard mgr that allows them to enter their
time, which opens the timesheet form in add mode, their is also a command
button that allows them to edit their timesheet in the event they ran into an
error after running the report.

In the beginning when the edit timesheet button was clicked, an employee
could view everyone's timesheet, and that did not need to happen. I wanted
only the supervisors to have those rights. This is what I did:

I created nine copies of the timesheet form and attatched the employees
initials to the end. i.e. TimesheetforJCL. Then I attached an OnOpen event
such as DoCmd.OpenForm "Timesheetforjcl", , , "[EmployeeID]='jcl'" to each
form. When I opened the forms individually the filter worked fine.

This is where I need help.

When I split the database, I thought that when I distribute the front end
copies , I'd just be able to attach that specific filtered form for that
employee to the edit timesheet command button on the switchboard. However it
changes the button's command on all of the fe copies. What did I do wrong
and how can I fix this to work the way I need it to work. Please explain
and remember I am a novice,as you can tell.
 
M

Michel Walsh

Hi,


An alternative is to have a single table in the backend, with one column
with the employeeID value. Then, open the form FILTERED so it can only
display info about a given employeeID. Allow the supervisor to open the form
un-filtered.




Hoping it may help,
Vanderghast, Access MVP
 
N

najah via AccessMonster.com

I've already applied the filters. How can I make each frontend copy open for
that specific employee from the switchboard. Everytime I create an onopen
event for one front end copy, all of the other employee's copies take on that
property.

Michel said:
Hi,

An alternative is to have a single table in the backend, with one column
with the employeeID value. Then, open the form FILTERED so it can only
display info about a given employeeID. Allow the supervisor to open the form
un-filtered.

Hoping it may help,
Vanderghast, Access MVP
Hey all,
I've designed a database to track the time and tasks of 9 employees. I've
[quoted text clipped - 29 lines]
and how can I fix this to work the way I need it to work. Please explain
and remember I am a novice,as you can tell.
 
M

Michel Walsh

Hi,


If you have access to some login process so you can identify the user, you
can open the form, say with DoCmd, with the whereCondition argument set
appropriately, like:


DoCmd.OpenForm FormName, WhereCondition := "UserID=" & userIDHere



Hoping it may help,
Vanderghast, Access MVP



najah via AccessMonster.com said:
I've already applied the filters. How can I make each frontend copy open
for
that specific employee from the switchboard. Everytime I create an onopen
event for one front end copy, all of the other employee's copies take on
that
property.

Michel said:
Hi,

An alternative is to have a single table in the backend, with one column
with the employeeID value. Then, open the form FILTERED so it can only
display info about a given employeeID. Allow the supervisor to open the
form
un-filtered.

Hoping it may help,
Vanderghast, Access MVP
Hey all,
I've designed a database to track the time and tasks of 9 employees.
I've
[quoted text clipped - 29 lines]
and how can I fix this to work the way I need it to work. Please
explain
and remember I am a novice,as you can tell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top