Login form & user logging???????

spacepro

Registered User.
Local time
Today, 04:53
Joined
Jan 13, 2003
Messages
715
I am thinking of creating a login form & table to store usernames, passwords and permissions.

I am unsure of what is the best way to do this. I also want to log who logs in and out of the database.

Does anyone have any ideas?
I have looked at previous posts, to get an idea but not many go into detail on permissions for users viewing certain forms/reports.

Do I create a module or do it through code.
What is the simpliest and the most effective way of securing the database, without using access security.

Many thanks in advance:confused:

Andy
 
Andy,

While Access security may not be the best, it is still far
easier to implement than your own creation.

You will have to create and manage a user's table, implement
your own custom login form and as user's navigate through
your app you must write the code to control which forms and
reports they should see.

Additionally, when loading forms, you will have to write the
code to make certain controls invisible and/or read-only.

Balance this with the time required to design and develop
your app to see if it is worthwhile.

hth,
Wayne
 
Thanks for the insight wayneryan.
I already have a workgroup set up on one database but I don't know how to log who logs in/out of the secured database.

Thus thinking about creating a non access security - custom username/password system with logging features.

Any ideas where I could start with a custom security/login form or do you think I should scrap this project, if it will time like you say?

Thanks
Andy
 
Andy,

You can let Access handle the security overall.

You can embellish it a little. If you had a user's table,
and assigned them to one of some number of groups,
then you could restrict their ability to see things. This is
better than having them try things and keep seeing
Access error messages.

You can use the On Open event in your main form to
track who logs in. You can record this in a table. You
can even expand upon that by logging other form entries/exits.
You could even extend that to logging the mods made
to certain critical fields in the database.

A good suggestion would be to start with Access security and
add on to it as time allows and/or needs require it.

Wayne
 
Hi Wayne,

Thanks for the info.
I know the ins & outs of access security(Already set up).
Does the logging of users come from the workgroup files using code or do I log the users from the pc name using code.
I know there are examples of code for logging users by network/pc name but not from the workgroup.

I would imagine that the usernames/passwords could be extracted from this?? or do I need to set up a table with the usernames/passwords in and lookup the user from this table.

Do you have an examples of this already, If not I will search the forums for code and see if I can modify it(maybe)!

Am I on the wrong track? I am just trying to get my head around the concept and the process needed to carry out the function.

Many Thanks
Andy;)
 
Andy,

Put the following in a Module:

' *************************************
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If lngX <> 0 Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = ""
End If
End Function
' *************************************

Call it with:
Me.UserName = fOSUserName()

I would let them use Access's login and call the
above from your main form. They will not even
be aware of it.

Just have a table with UserName, GroupName and
whatever else you care to add to it.

Wayne
 
Thanks for all your help Wayne.
Much appreciated.

Andy
 

Users who are viewing this thread

Back
Top Bottom