T
Todd H
Dim dbs As Database
Dim strCurPer As String
Dim intCurPer As Integer
Set dbs = CurrentDb
strCurPer = "SELECT BillingPeriodNumber FROM tblBillingPeriod" &
"WHERE [tblBillingPeriod.BillingPeriodEndDate] Between" & "#" &
Format(DateAdd("m", -4, Date), "mm/dd/yyyy") & "# And #" _
& Format(DateAdd("m", -3, Date), "mm/dd/yyyy") & "#"
'MsgBox to Troubleshoot
MsgBox ("strCurPer is" & [strCurPer])
intCurPer = Val(strCurPer)
I am trying to have this SQL statement return a BillingPeriodNumber
and then turn that String value into an Integer. I added the text box
to see the value of strCurPer and now it returns the text of the code
with the dates calculated. What am I doing wrong?
Dim strCurPer As String
Dim intCurPer As Integer
Set dbs = CurrentDb
strCurPer = "SELECT BillingPeriodNumber FROM tblBillingPeriod" &
"WHERE [tblBillingPeriod.BillingPeriodEndDate] Between" & "#" &
Format(DateAdd("m", -4, Date), "mm/dd/yyyy") & "# And #" _
& Format(DateAdd("m", -3, Date), "mm/dd/yyyy") & "#"
'MsgBox to Troubleshoot
MsgBox ("strCurPer is" & [strCurPer])
intCurPer = Val(strCurPer)
I am trying to have this SQL statement return a BillingPeriodNumber
and then turn that String value into an Integer. I added the text box
to see the value of strCurPer and now it returns the text of the code
with the dates calculated. What am I doing wrong?