Restricting users on form.

dxqwest

Registered User.
Local time
Today, 20:03
Joined
Aug 21, 2001
Messages
13
In a spreadsheet I have a list of users and their pin numbers. On my form I want to develop two text boxes that the user enters their last name and pin # and a button that they click on verifies the name and pin # which then determines if they can enter in data. How would I go about doing this?
 
I think that it would be more feasible to look into setting access's security on this. You can set specific permissions for each user.
 
I have thought of that but that would take more time than I have, sense there are about 300 people in this building and about 200 people in our Minneapolis building. Is there any other way?
 
Using DLookup to see if the entered Name and PIN exists in your table should work for you...

If IsNull(DLookup(....)) Then
Msgbox "You are not authorized"
Exit sub
End If
 
Jack Cowley Member wrote:

Using DLookup to see if the entered Name and PIN exists in your table should work for you...
If IsNull(DLookup(....)) Then Msgbox "You are not authorized"
Exit sub
End If

Before I set up this code, how should I bring over the names and pin #s in my Excel document. Should I bring it over as a linked document or just add the names and pin #s as new look up fields in my table?
 
Since I don't know how to read the data in an Excel worksheet from Access then I would suggest importing the data into a 3 field table; FirstName, LastName and PIN. Maybe just LastName will be adequate with the PIN.
 
I just received notice that my boss does not want a look up fields for the name and pin #s because we want to keep this information confidential. Is there still away I could do what I want without a lookup field but maybe have this information stored in a different table.
 
You can hide the lookup table if you like. The only other option that comes to mind is to set up security, which you don't want to do, but someone who wants the names and PIN numbers will get them if you don't use a more secured system.
 
Users can be given permissions via GROUPS. You will of course need to add users to the appropriate GROUPS but once. This level of Access security disallows the users from accessing any tables, forms, etc that you do not set permissions form. It can also be used to control who can edit, add, and delete certain data. I truly feel, that based on the size of your personnel, Access security is the appropriate way to go.
 

Users who are viewing this thread

Back
Top Bottom