Hi
The login form closes once logged in I think here is the VBA code
Private Sub Command4_Click()
Text5.SetFocus
If Text5 = "Admin" And Text2 = "Password0" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Emma Hopcroft" And Text2 = "Password1" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Rob Huskisson" And Text2 = "Password2" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Rob Williams" And Text2 = "Password3" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Stuart Fox" And Text2 = "Password4" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Keiron Palmer" And Text2 = "Password5" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Kit Patel" And Text2 = "Password6" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Chris Grima" And Text2 = "Password7" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Andy James" And Text2 = "Password8" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Shelly Sawford" And Text2 = "Password9" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Julie Cain" And Text2 = "Password10" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Nick Thompson" And Text2 = "Password11" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Olly Evans" And Text2 = "Password12" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Sean Connolly" And Text2 = "Password13" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
ElseIf Text5 = "Nicki Winpenny" And Text2 = "Password14" Then
MsgBox "Access Granted", vbInformation, "RAC Inspections Engineer Quality Check"
DoCmd.Close
DoCmd.OpenForm "frmReportView"
Else
MsgBox "Please re-enter your User Name and Password", vbInformation, "Login Details Unknown"
End If
End Sub
The query uses [forms]![frmLoginPage]![Text5]