First a comment... It would be better if the control names were changed from the Access default. For example, which is easier to understand/trace:
Code:
Private Sub Command247_Click()
If IsNull(Me.Combo256) Or Me.Combo256 = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.Combo256.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.Text254) Or Me.Text254 = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.Text254.SetFocus
Exit Sub
End If
Or
Code:
Private Sub cmdLogOn_Click()
If IsNull(Me.cboUserName) Or Me.cboUserName = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboUserName.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
I always rename controls/events to meaningful names.
I was also curious about this
if a user quits, be able to reassign a new user to access that form.
Does each user have a form? So that if there are 50 users, there are 50 forms?