Hey everybody,
I am picking Access up again after a long time. I am trying to insert (append) some new records onto an existing table. These new records need to have a date that auto increments by one day for each new record, based on the existing latest date,but I'm hitting a roadblock.
In the query I've managed to cobble together the following expression:
but the result I get is not what I expected.
What I expected: for each new record, a new day would be presented, so that if, for instance, the latest date on record is 3rd Sep 2019, the first new record would have 4th Sep 2019, the second new record would have 5th Sep 2019 and so on.
What I get: For each record, I am getting the same date, which is the latest date+1, so as in the example above I would get 4th Sep 2019 for all record.
I think the issue should be solvable either through a Query expression or an SQL statement, without the need for VBA code.
Does the problem make sense?
Happy to expand on the db structure if that helps.
Thank you
faap
I am picking Access up again after a long time. I am trying to insert (append) some new records onto an existing table. These new records need to have a date that auto increments by one day for each new record, based on the existing latest date,but I'm hitting a roadblock.
In the query I've managed to cobble together the following expression:
Code:
MyField: CDate(DMax("[Latest Arrivals Query].[DateServed]","Latest Arrivals Query")+1)
What I expected: for each new record, a new day would be presented, so that if, for instance, the latest date on record is 3rd Sep 2019, the first new record would have 4th Sep 2019, the second new record would have 5th Sep 2019 and so on.
What I get: For each record, I am getting the same date, which is the latest date+1, so as in the example above I would get 4th Sep 2019 for all record.
I think the issue should be solvable either through a Query expression or an SQL statement, without the need for VBA code.
Does the problem make sense?
Happy to expand on the db structure if that helps.
Thank you
faap