Mal said:
I have created a simple login screen for security and I am trying to
figure out how to create a way that only the records show from the
login point forward that this user created. I don't want other people
seeing those records unless it is a adminisitrator.
I am not that advanced a user so simple is good.
Thank You for your help
Mallory
You need to set it up so that all records added are stamped
automatically with the current user. That means there must be a field
in the table to store the UserID, and the form whereby records are added
must set that field for each record added. If you're managing your own
security, rather than using Access's built-in user-level security (which
admittedly is rather finicky to set up, if you want your database to be
secure) then you need to have a global variable or function that will
return the user's login ID whenever it's called for. Then you can
either set the DefaultValue of a hidden control on the form to the
function that returns the UserID, or else use an event procedure in the
form's BeforeUpdate event to assign the UserID to the field before the
record is written out.
You also need to base all forms and queries of this data on a query that
returns only those records that match the current UserID, UNLESS that
UserID is an administrator. Naturally, you also need some means to
determine whether the user is an administrator or not, which is
something you can do at logon time.