D
dariley
I'm trying take a date value that entered through the calendar contro
and use it to determine which pay period that date belongs to. But
even though the calendar1.value is crossing properly, the Select Cas
method is picking the first date range every time. Below is a sampl
of the code I'm using, I'm not sure what other details I need t
include...this is my first time to post. But, any help is VER
appreciated.
Private Sub CmdSubmit_Click()
Dim CalValue as Date
CalValue = Calendar1.Value 'Determine the Pay Period
CalValue = Format(Date, "mm/dd/yyyy")
Select Case CalValue
Case "2/22/2004" To "3/6/2004"
PayPeriod = "2"
Case "3/7/2004" To "3/20/2004"
PayPeriod = "3"
Case "3/21/2004" To "4/3/2004"
PayPeriod = "4"
Case "4/4/2004" To "4/17/2004"
PayPeriod = "5"
Case "4/18/2004" To "5/1/2004"
PayPeriod = "6"
End Selec
and use it to determine which pay period that date belongs to. But
even though the calendar1.value is crossing properly, the Select Cas
method is picking the first date range every time. Below is a sampl
of the code I'm using, I'm not sure what other details I need t
include...this is my first time to post. But, any help is VER
appreciated.
Private Sub CmdSubmit_Click()
Dim CalValue as Date
CalValue = Calendar1.Value 'Determine the Pay Period
CalValue = Format(Date, "mm/dd/yyyy")
Select Case CalValue
Case "2/22/2004" To "3/6/2004"
PayPeriod = "2"
Case "3/7/2004" To "3/20/2004"
PayPeriod = "3"
Case "3/21/2004" To "4/3/2004"
PayPeriod = "4"
Case "4/4/2004" To "4/17/2004"
PayPeriod = "5"
Case "4/18/2004" To "5/1/2004"
PayPeriod = "6"
End Selec