L
Lori
I am trying to filter/restrict access of records based on
how a user is logged in - not who created the records.
For example, I want a salesperson to be able to only view
their orders. They have a login and I have created user
names/groups. Someone answered a similar question below,
but I don't want to base views by who created the records,
but by who "owns" it (their employee name is in an
employee table and is linked to each form/report).
Thanks,
Lori
An easier & simpler method is to do it
through VBA code. Define a field in each table, to hold
the username of the
user who created that record. Code the BeforeUpdate event
of each form, to
put the value of the CurrentUser() function into that
field. Now each record
knows who created that record. Then base each form on a
query like:
SELECT * FROM MyTable WHERE CreatedBy = CurrentUser()
how a user is logged in - not who created the records.
For example, I want a salesperson to be able to only view
their orders. They have a login and I have created user
names/groups. Someone answered a similar question below,
but I don't want to base views by who created the records,
but by who "owns" it (their employee name is in an
employee table and is linked to each form/report).
Thanks,
Lori
An easier & simpler method is to do it
through VBA code. Define a field in each table, to hold
the username of the
user who created that record. Code the BeforeUpdate event
of each form, to
put the value of the CurrentUser() function into that
field. Now each record
knows who created that record. Then base each form on a
query like:
SELECT * FROM MyTable WHERE CreatedBy = CurrentUser()