View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default add 1 day to date variable

Dave Try this
st = DatePart("d", rs.Fields("tasks.task_ass_date")) + 1
due = DatePart("d", rs.Fields("task_ddate"))
"DaveMZ" wrote:

Hello, hopefully somebody can help me,

I'm retrieving 2 records from an Access table, a start date and a due date.
I'd like to retrieve a 3rd record, which would be the start date + 1.
However, the following doesn't work:

st = DatePart("d", rs.Fields("tasks.task_ass_date"))
due = DatePart("d", rs.Fields("task_ddate"))
next = st + 1

It gives me a compile error: expected: variable.

Does anyone have any suggestions? Thanks in advance for any help,