
If you wish to create your own custom login screen for a secured database, this is possible in an off-handed way--by creating another database strictly for this purpose which opens the actual secured database. Steps:
| Tab | Setting | |
| Format | Caption | Enter your User ID & Password |
| Record Selectors | No | |
| Navigation Buttons | No | |
| Control Box | No | |
| Min Max Buttons | None | |
| Close Button | No | |
| Other | Menu Bar | =1 |
| Allow Design Changes (Access 2000 only) | Design View Only |
Private Sub cmdOK_Click()
' strAccessPath is the path to execute Access, usually close to what is shown here
' strDBasePath is the path where your database is located
' strWkgrpPath is the path where your workgroup security file is located
Dim strPath As String
Dim strAccessPath As String, strDBasePath As String, strWkgrpPath As String
strAccessPath = "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"
strDBasePath = "T:\Accounting\PO Invoicing\po_invoices2k.mde"
strWkgrpPath = "T:\Accounting\PO Invoicing\workgroup.MDW"
strPath = Chr(34) & strAccessPath & Chr(34) & " " & Chr(34) & strDBasePath _
& Chr(34) & " " & "/wrkgrp " & Chr(34) & strWkgrpPath & Chr(34) & " " _
& "/User " & Chr(34) & Me![txtUser] & Chr(34) & " " _
& "/Pwd " & Chr(34) & Me![txtPassword] & Chr(34)
' Debug.Print strPath ' Uncomment this line to have the strPath
' variable displayed in the immediate window
Shell strPath, vbMaximizedFocus
Application.Quit
End Sub