ChampionDuy
Registered User.
- Local time
- Today, 06:07
- Joined
- Mar 14, 2002
- Messages
- 94
I have a subform that displays one field of data called Renew Date. There are multiple renew dates that are listed in the sub form. How do I go about searching each one of those Dates and checking to see if there is one that is between 2 dates that a user enters. The If statement that I have shown below only compares the first record. I know I need to do a loop and a record count but I am not sure how to do that. The variables I use for something Else.
Y = 0
Dim LcRenew As Date
RENEW_DATE.SetFocus
LcRenew = DateValue(RENEW_DATE.Value)
If LcRenew >= StartingDate And LcRenew <= EndingDate Then
Y = 0
Else: Y = 1
End If
Ynum.SetFocus
Ynum.Text = Y
Y = 0
Dim LcRenew As Date
RENEW_DATE.SetFocus
LcRenew = DateValue(RENEW_DATE.Value)
If LcRenew >= StartingDate And LcRenew <= EndingDate Then
Y = 0
Else: Y = 1
End If
Ynum.SetFocus
Ynum.Text = Y