Finding Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Thank you for the response.
Could you please give me an example of the global call? I have assigned an
ID with the login person and what data entry that has been done. I have tried
running a query once a name has been selected in the login ----however in my
combo box I can not get those records to show in that combo.
Any Ideas?

Thanks Again
Mallory
 
Mal said:
Thank you for the response.
Could you please give me an example of the global call? I have
assigned an ID with the login person and what data entry that has
been done. I have tried running a query once a name has been selected
in the login ----however in my combo box I can not get those records
to show in that combo.
Any Ideas?

Thanks Again
Mallory

I'm not sure what you're asking. Please post what you currently have,
as it relates to these security features: the tables, fields, forms,
controls, variables, and code.
 
Back
Top