Secure Database

DanG

Registered User.
Local time
Today, 13:26
Joined
Nov 4, 2004
Messages
477
I would like to secure my database (ha ha...at least to some extent).
Here is the basics...
When someone comes into the database I can identify them as they enter by using "Environ("username"), this gives me a unique number for that user ("R54436") (I am on a system called "Citrix" with FE/BE) and from there I would like to:
1.) let them in or not let them in
2.) direct them to particular areas based on who they are
3.) deny access to certain areas all together

I have a table in which I have all users "R" number along with name, user level (1,2 or 3) and the branch office number and can add other info if needed.

I have a form that loads before anything else (invisible) that captures the users "R" number.

I guess I am just not sure how to compare the "R" number that I capture on the invisible form with the "R" numbers in my table. Ultimately once I find a match I would like to populate the invisible form with that users values from the table so I can reference those values throughout their vistit.

Any pointers would be great.
 
you could write a query that selects the user id from your table passing the userId value from the form as a parameter to the query
(in the criteria section of the column ;Forms![Yourform]![fieldname])
then do a dlook up on the query if t returns a null value the user Id does not exist

Dim Username as string
Username = nz(dlookup("[querycolumnname]","[Queryname]"),"")

if Username = "" then
'the user does not exist"
else 'do whate you need to do'
end if
 
security

Dan,

Please find attached a basic password entry form. This uses VB to cycle through the table to find the personal details. Its fairly easy to create a logentry table and use VB code to write the details of who logged in and when to it.

Not sure if this will be of any help to you but thought id post it anyway.

regards

ian
 

Attachments

I capture the network logon from an invisible form and then use

If Not IsNull(DLookup("[Forms]![frm_User_Computer_Names]![Text0]", "[tbl_Core_User]", "[Forms]![frm_User_Computer_Names]![Text0]=[tbl_Core_User].[LogonID]")) Then
cmd_User.Visible = True
cmd_User_Control.Visible = True
cmd_Editor.Visible = True
cmd_Edit_Supplier.Visible = True
cmd_Add_Supplier.Visible = True
cmd_SMPA_Auth.Visible = True
Command24.Visible = True
Command26.Visible = True

etc

to control what they can see in terms of command buttons and hence what they can do

The else but says shutdown and so if they are not authorised the database closes

Len
 

Users who are viewing this thread

Back
Top Bottom