Can I set up some type of authenticating method for end users to .

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

Guest

Hi everyone, I am new in access, I am trying to set up some type of
authentication method for end users to access their records. More detailed, I
am setting up a time card data base, but I would need to have every end user
enter their full name and Password before they can see and add data to their
time card. The user name and password are in a table called Employee
information and the time record is in a table called timecard, the
relationship is thru full name field. I created a query with both tables, in
the last name field (Employeed info table) I used the Like criteria, and also
did the same in the password field, this worked except that my time card did
not populated the last name field (from the timecard table).
I now for sure there must be a little VB code to validate these fields, I am
not a programmer .. yet. I hope there is someone out there with an idea.

Thank you
 
Why are you recreating the wheel here? You don't need to store passwords in
a table. Use the built-in Access User-level security. This will force them
to log in and validate their passwords (without storing it in a table that
they could likely get to and view).

You can use the UserID to validate and retrieve records only for the current
user.

Rick B
 
You might find that grabbing the user's Windows login name may be all you
need:

http://www.mvps.org/access/api/api0008.htm

Using this, you can create a Public (Global) variable in the Declarations
section of a standard module, like (aircode):

Dim sUser As String

Then create a function that sets it like:

Public Function MyUserName()
sUser = fOSUserName ' from the URL above
End Function

Now in a query, you can use it like:

Select * From tblEmployees
Where EmployeeUserName = MyUserName();
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top