Ok Basically Ive got a table with a field that is a yes/no named Used how to i alert the user when theirs already an account with that Key?
My Codeis below Help would be great
Private Sub Command4_Click()
If IsNull(txtEmployeeKey) Or txtEmployeeKey = "" Then
MsgBox "Please Enter Valid Employee Key", vbOKOnly, "Required"
Me.txtEmployeeKey.SetFocus
Exit Sub
End If
Me.txtEmployeeKey.Value = DLookup("[EmployeeKey]", "tblEmpKey", "EmployeeKey ='" & [EmployeeKey] & "'")
If Me.txtEmployeeKey.Value = Me.txtEmployeeKey.Value Then
MsgBox "Thank You for Registering"
DoCmd.close
DoCmd.OpenForm "Form1"
Else
MsgBox "Incorrect Employee Key Or Username already in use", vbOKOnly, "Incorrect Infomation"
End If
End Sub
My Codeis below Help would be great
Private Sub Command4_Click()
If IsNull(txtEmployeeKey) Or txtEmployeeKey = "" Then
MsgBox "Please Enter Valid Employee Key", vbOKOnly, "Required"
Me.txtEmployeeKey.SetFocus
Exit Sub
End If
Me.txtEmployeeKey.Value = DLookup("[EmployeeKey]", "tblEmpKey", "EmployeeKey ='" & [EmployeeKey] & "'")
If Me.txtEmployeeKey.Value = Me.txtEmployeeKey.Value Then
MsgBox "Thank You for Registering"
DoCmd.close
DoCmd.OpenForm "Form1"
Else
MsgBox "Incorrect Employee Key Or Username already in use", vbOKOnly, "Incorrect Infomation"
End If
End Sub