I'm not sure that I understand how the wizard will help me. I already have the .mdw file created and all the user accounts and groups are created already too. All the accounts have been assigned as members to the groups I created, and all permissions were assigned at the group level.
Here is how I have the users launching the database so they use the workgroup file:
The user launches the initial front end. There are several different buttons for the different databases available. When the user clicks on the one they wish to use, it launches the correct database and the workgroup file for them. Here is the code behind one of them for example:
Code:
Private Sub cmdECNandReleaseDatabase_Click()
Dim UserNameStr As String
UserNameStr = UserNameFunction
Const ACCESSEXE = "msaccess.exe"
Const FileName = "O:\Database\DataStorage\MASTERECNDatabase.mde"
Const SECUREWRK = "O:\Database\DataStorage\SecureDBWorkgroup.mdw"
Dim strFilePath As String, varAppID As Variant, strShell As String
On Error GoTo err_cmdWrkOpen
strFilePath = SysCmd(acSysCmdAccessDir)
If Len(Dir(FileName)) > 0 And Len(Dir(SECUREWRK)) > 0 Then
strShell = strFilePath & ACCESSEXE & " " & FileName & " " & _
"/WRKGRP " & Chr(34) & SECUREWRK & Chr(34) & _
"/USER " & Chr(34) & UserNameStr & Chr(34)
varAppID = Shell(strShell, vbNormalFocus)
Else
MsgBox "Problem Opening Your Application. Contact your DBA", vbCritical
End If
DoCmd.Quit acQuitSaveAll
exit_cmdWrkOpen:
Me.ActiveControl.Name & "_Click"
Exit Sub
err_cmdWrkOpen:
Select Case Err.Number
Case vbObjectError + 1
Resume Next
Case Else
MsgBox "Error No. " & Err.Number & " -> " & Err.Description, vbCritical
End Select
Resume exit_cmdWrkOpen
End Sub
The actual database they work in is owned by my user ID and the Admin has no permissions to any objects...that is how I am enforcing them to use this front (launching) database.
The UserNameFunction is a separate module that determines the Windows Log-in...so in actuality, I set it up so that the Windows log-in user id and workgroup log-in id are always the same.
Since I know the log-in ID...now I am wanting it to do something like a 'look-up' within the workgroup information file so that it takes the user id and looks to see what groups he/she is a member of. Then at the very beginning of the On Load event I can use a statement something like...
IF
groupname Like "*Coordinator*" then Exit Sub
to make it bypass the remaining code of the event.
Make any sense?
Regards,
Laura
FYI...My user id has changed. My old id was lbreitenbach
The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!