K
Keypad
Hello,
I need to check if a value is > 0 and <= 7. I can code it to check a single
condition, but can't write correct code to check two conditions at once. I'm
using the code below to show a criterior based on the value of DaysLeft as
shown below. Can someone write the code to check if DaysLeft is > 0 and <=
7. Many thanks.
Select Case Me.cboReport.Column(1)
Case "Expired"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 0
Case "Expires within 7 days"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 7
Case "Expires within 30 days"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 30
Case "View All Records"
DoCmd.OpenReport "Expirations", acViewPreview
End Select
End Sub
I need to check if a value is > 0 and <= 7. I can code it to check a single
condition, but can't write correct code to check two conditions at once. I'm
using the code below to show a criterior based on the value of DaysLeft as
shown below. Can someone write the code to check if DaysLeft is > 0 and <=
7. Many thanks.
Select Case Me.cboReport.Column(1)
Case "Expired"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 0
Case "Expires within 7 days"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 7
Case "Expires within 30 days"
DoCmd.OpenReport "Expirations", acViewPreview, , "[DaysLeft] <= " & 30
Case "View All Records"
DoCmd.OpenReport "Expirations", acViewPreview
End Select
End Sub