I figured it out! I had to create a boolean variable.
Code:
Option Compare Database
Private Sub Form_Current()
Me.Form.Requery
End Sub
Private Sub cboOrganization_AfterUpdate()
Me.cboShopName.Requery
Me.cboOfficeSym.Requery
End Sub
Private Sub cmdSubmit_Click()
Dim db As Database
Dim rs As DAO.Recordset
Dim isPerson As Boolean
isPerson = False
isPerson = isPerson Or Not Me.cboRank.Value = "" And Not IsNull(Me.cboRank.Value)
isPerson = isPerson Or Not Me.txtLastName.Value = "" And Not IsNull(Me.txtLastName.Value)
isPerson = isPerson Or Not Me.txtFirstName.Value = "" And Not IsNull(Me.txtFirstName.Value)
If isPerson Then
If Not IsNull(Me.txtPhoneNum.Value) _
And Not IsNull(Me.txtEmail.Value) _
And Not IsNull(Me.cboOrganization.Value) _
And Not IsNull(Me.cboShopName.Value) Then
Call AddEntry
Else
MsgBox "Respectfully, **** You." & vbCrLf & vbCrLf
End If
Else
If Not IsNull(Me.txtPhoneNum.Value) _
And Not IsNull(Me.txtEmail.Value) _
And Not IsNull(Me.cboOrganization.Value) _
And Not IsNull(Me.cboShopName.Value) Then
Call AddEntry
Else
MsgBox "Respectfully, **** You." & vbCrLf & vbCrLf
End If
End If
End Sub
'Separate sub for adding the actual entry
Private Sub AddEntry()
Set db = CurrentDb
Set rs = db.OpenRecordset("tblCustomer")
If DCount("*", "tblCustomer", "[Email]='" & Me.txtEmail & "'") > 0 Then
MsgBox "**** You." & vbCrLf & vbCrLf
Else
rs.AddNew
rs("OrganizationFK").Value = Me.cboOrganization
rs("ShopNameFK").Value = Me.cboShopName
rs("OfficeSymFK").Value = Me.cboOfficeSym
rs("RankFK").Value = Me.cboRank
rs("LastName").Value = Me.txtLastName
rs("FirstName").Value = Me.txtFirstName
rs("PhoneNum").Value = Me.txtPhoneNum
rs("Email").Value = Me.txtEmail
rs.Update
Me.frmAddCust.Requery
End If
End Sub