T
tracktraining
Hi All,
I searched is forum for help on how to put password on forms (or just put
some kind of restrictions) and didn’t find anything.
I want to allow certain users to have access to certain forms in my MS
Access db. Can that be done?
When the user opens the db in Access and clicks on a form, the db should
pick up the username from Windows. Then match the username with the jobfunc
that the user is assigned to in the db. I want only certain jobfunc (users
are assigned to jobfunc) to have access (able to open, read-only, add or
delete) to certain forms.
I found the following code to get the user Windows login name. I don’t know
where to put this code or how to use it.?
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
ret = GetUserName(lpBuff, 25)
UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
http://support.microsoft.com/kb/152970
Can anyone give me any suggestion on how to do this?
Thanks,
TrackTraining
I searched is forum for help on how to put password on forms (or just put
some kind of restrictions) and didn’t find anything.
I want to allow certain users to have access to certain forms in my MS
Access db. Can that be done?
When the user opens the db in Access and clicks on a form, the db should
pick up the username from Windows. Then match the username with the jobfunc
that the user is assigned to in the db. I want only certain jobfunc (users
are assigned to jobfunc) to have access (able to open, read-only, add or
delete) to certain forms.
I found the following code to get the user Windows login name. I don’t know
where to put this code or how to use it.?
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
ret = GetUserName(lpBuff, 25)
UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
http://support.microsoft.com/kb/152970
Can anyone give me any suggestion on how to do this?
Thanks,
TrackTraining