On the Login form, I'm assuming they have to enter a Password only. So in your Login button on that form, you must check that they entered a value before opening frmMainMenu.
If Isnull(me.txtPWD) thenMsgbox "You must enter a valid password"
Me.txtPWD.Setfocus
End
ElseIf me.txtPWD = IN("SU", "US") Then
Docmd.OpenForm "frmMainMenu
Else
Msgbox "Password Invalid, please try again."
Me.txtPWD.Setfocus
End
End If
End If
This code needs to run on the OnOpen event of form frmMainMenu
If Forms!frmLogin.txtPWD Like "SU*" Then Forms!frmMainMenu!optMaintenance.Enabled = False
Else
If Forms!frmLogin.txtPWD Like "US*" Then
Forms!frmMainMenu!optReports.Enabled = False
Forms!frmMainMenu!optSuspCase.Enabled = False
Forms!frmMainMenu!optMaintenance.Enabled = False
End If
End If
DoCmd.Close acForm, "frmLogin", acSavePrompt