First two If Then's work fine (no action) but I having trouble with the third If Then. I want the wave file to play if there are 1 to 5 records. I believe the problem the AND but I don't know how to write a between statement using the variable. Any help would be appreciated.
Dim VarCount As Variant
VarCount = Forms!frmCustomersInQueue2.Recordset.RecordCount
DoCmd.Requery
If VarCount = 0 Then
Else
If VarCount > 5 Then
Else
If VarCount > 0 And VarCount < 6 Then
Call PlayWaveFile("C:\Users\Public\Documents\SignInPlus\SignInTool\doorbell.WAV")
End If
End If
End If
Dim VarCount As Variant
VarCount = Forms!frmCustomersInQueue2.Recordset.RecordCount
DoCmd.Requery
If VarCount = 0 Then
Else
If VarCount > 5 Then
Else
If VarCount > 0 And VarCount < 6 Then
Call PlayWaveFile("C:\Users\Public\Documents\SignInPlus\SignInTool\doorbell.WAV")
End If
End If
End If