If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: IF statement to check if all the boxes are filled

Please help with the IF statement to check if all the boxes are filled, if not then throw "Please complete all fields" when I click on "add record button"
here is how my code looks and the picture is attached:
Private Sub btnSaveCommand_Click()
Me.AppointmentDate.SetFocus
If Me.AppointmentDate.Text = "" Then
MsgBox "Please complete all fields"
ElseIf Me.cboClient.Value Then
MsgBox "Please complete all fields"
ElseIf Me.cboSalon.Value Then
MsgBox "Please complete all fields"
ElseIf Me.cboSalon.Value Then
MsgBox "Please complete all fields"
ElseIf Me.cboStaff.Value Then
MsgBox "Please complete all fields"
ElseIf Me.cboService.Value Then
MsgBox "Please complete all fields"
ElseIf Me.ProductID.Value Then
MsgBox "Please complete all fields"
End If
Else
DoCmd.GoToRecord , , acNewRec
MsgBox "Thanks - Appointment Booked!"

your users are going to love that approach, the same message for 7 different error states

there's lots of ways of handling this
one is to flip the back colour of each control which is incorrect, works fine providing all users have colour screens, there's no requirement for colour sensistive awareness.

another is to spot there is a problem and report each line with a fault

vbcrlf is a VB constant that adds a new line (well actually a carriage return (CR) + a linefeed (LF)
for code brevity I have not used the classic style of if statement, whcih some purists may throw their hands up in horror