johnlatona123
Innovator
- Local time
- Yesterday, 17:50
- Joined
- Sep 20, 2011
- Messages
- 85
hi!
a little background...i am a novice access user, learning as i go, so bear with me
this may all sounds like a bit of crazy talk, but i could really use a hand in writing something that accomplishes the following in microsoft access 2010:
i want to create a username and password function that restricts access to various forms in my database through general levels of permissions.
this would need to be something i can hide from other users. how do i do that?
i need to have acess to the area where i can update users names and passwords.
my first thought was to create a table containing all users names and passwords and use that as a means to open other forms via a "login form" but that has not panned oout like i hoped.
and i would like to tie this entire concept of being "logged in" with a timestamping funciton i have put together.
the timestamping function looks somthing like this and is contained in each form in the database and is functional on all the forms in my database:
Private Sub Form_AfterUpdate()
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strSQL As String
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
'
strSQL = "SELECT * FROM [Material Tracking]"
rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic
With rst
rst.AddNew
![job changed 2] = [Job]
![time changed 2] = Now()
![part number changed] = [part number]
![quantity changed 2] = [quantity needed]
![dock date changed] = [dock date]
![PO changed] = [PO number]
![supplier changed] = [supplier]
![buyer changed] = [Buyer Name]
![part notes changed] = [part notes]
![when backorder filled] = [Backorder filled]
rst.Update
End With
'
rst.Close: Set rst = Nothing
cnn.Close: Set cnn = Nothing
End Sub
any help in this regard would be much appreciated.
thanks!
john L
a little background...i am a novice access user, learning as i go, so bear with me
this may all sounds like a bit of crazy talk, but i could really use a hand in writing something that accomplishes the following in microsoft access 2010:
i want to create a username and password function that restricts access to various forms in my database through general levels of permissions.
this would need to be something i can hide from other users. how do i do that?
i need to have acess to the area where i can update users names and passwords.
my first thought was to create a table containing all users names and passwords and use that as a means to open other forms via a "login form" but that has not panned oout like i hoped.
and i would like to tie this entire concept of being "logged in" with a timestamping funciton i have put together.
the timestamping function looks somthing like this and is contained in each form in the database and is functional on all the forms in my database:
Private Sub Form_AfterUpdate()
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strSQL As String
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
'
strSQL = "SELECT * FROM [Material Tracking]"
rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic
With rst
rst.AddNew
![job changed 2] = [Job]
![time changed 2] = Now()
![part number changed] = [part number]
![quantity changed 2] = [quantity needed]
![dock date changed] = [dock date]
![PO changed] = [PO number]
![supplier changed] = [supplier]
![buyer changed] = [Buyer Name]
![part notes changed] = [part notes]
![when backorder filled] = [Backorder filled]
rst.Update
End With
'
rst.Close: Set rst = Nothing
cnn.Close: Set cnn = Nothing
End Sub
any help in this regard would be much appreciated.
thanks!
john L