Question : User name and password to perform a change access 2003

Hello,
 Have a db that will eventually be a sort of "process management db".  Each record is an item that goes through several stages/status.   All user interaction is done through forms. As the item progresses through the process, the user will update the status control (a combo "cbostatus" containing "Creation", "Release", Inspection,"etc.) Thing is, we don't want users to be able to change these stage on a whim or accidentally. I have controls behind the cbo that prevent it from skipping a step ie. creation must go to release before it can go to inspection.   But we would also like to have the process signed of by an authorized member of staff like a manager.  I would like to have them use their user name and password to do this.  Problem is, i planned on using the user level securities wizard to control the passwords and usernames.  How can I user the wizard and still require a user name and password each time the status is changed?

Answer : User name and password to perform a change access 2003

<>

 I would not use user level security to control this as it is not stright forward to implement.  Instead, I would disable the drop down control, place a command button next to it "Change Status" and let them click on it to change the status.

 You can then use the attached code to capture their station name and/or network username behind the secenes to record who change the status.

JimD.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
Private Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As String, nSize As Long) As Long
 
Private Declare Function GetUserNameA Lib "advapi32.dll" (ByVal lpBuffer As String, nSize As Long) As Long
 
Public Function WhoAmI(bReturnUserName As Boolean) As String
 
        ' Function returns either user name or computer name
 
        Dim strName As String * 255
 
10      If bReturnUserName = True Then
20        GetUserNameA strName, Len(strName)
30      Else
40        GetComputerNameA strName, Len(strName)
50      End If
 
60      WhoAmI = left$(strName, InStr(strName, vbNullChar) - 1)
 
End Function 
 
 
    
Random Solutions  
 
programming4us programming4us