R
RLN60
RE: Access 2007/WinXP-SP3
I am trying to calculate a date 35 days from the date in my recordset. The
recordset value was retrieved from a column in my table with a format of
Date, and the format of the field in the table was "Short Date".
By the time the application gets to these two lines of code,
rst.Fields(4).Value contains a valid date "8/31/2009" (minus the quotes).
Here are my two lines of code:
<begin code>
Dim intDaysRemaining as integer
intDaysRemaining = DateSerial(Year(rst.Fields(4).Value),
Month(rst.Fields(4).Value), Day(rst.Fields(4).Value) + 35)
<end code>
I am getting an "Overflow6" error when trying to use the DateSerial function.
I was anticipating getting a date back like "10/15/2009", or whatever 35
days on the calendar would be from the date provided in rst.Fields(4).value.
I got the Date SErail function from the Access portion of the MS Office
website, but apparently I still am not doing something correctly , but I
don't see it.
Any assistance would be appreciated.
Thank you.
I am trying to calculate a date 35 days from the date in my recordset. The
recordset value was retrieved from a column in my table with a format of
Date, and the format of the field in the table was "Short Date".
By the time the application gets to these two lines of code,
rst.Fields(4).Value contains a valid date "8/31/2009" (minus the quotes).
Here are my two lines of code:
<begin code>
Dim intDaysRemaining as integer
intDaysRemaining = DateSerial(Year(rst.Fields(4).Value),
Month(rst.Fields(4).Value), Day(rst.Fields(4).Value) + 35)
<end code>
I am getting an "Overflow6" error when trying to use the DateSerial function.
I was anticipating getting a date back like "10/15/2009", or whatever 35
days on the calendar would be from the date provided in rst.Fields(4).value.
I got the Date SErail function from the Access portion of the MS Office
website, but apparently I still am not doing something correctly , but I
don't see it.
Any assistance would be appreciated.
Thank you.