I am adding records to a recordset using DateAdd. The records need to be added at weekly, fortnightly, or four weekly intervals.
I have managed to get it sort of working using "ww" as the interval, a variable intInterval to say whether it is 1, 2 or 4 weeks to add, but I somehow need to find a way of getting the date of the previously added record in order to get the DateAdd function to append, for instance, fortnightly dates.
I tried DMax("dtmSupDate") -i.e. the date field that is getting appended within the recordset - but that gets thrown out in the compile.
I also tried DMax("dtmSupDate", "tblTmpSS") on the basis that tblTmpSS is the table which the recordset is based upon but that didn't work either.
I am sure there is probably a fairly standard way of getting the value for the date part of the DateAdd() function but am currently stuck.
Any suggestions?
Thanks
Malcy
I have managed to get it sort of working using "ww" as the interval, a variable intInterval to say whether it is 1, 2 or 4 weeks to add, but I somehow need to find a way of getting the date of the previously added record in order to get the DateAdd function to append, for instance, fortnightly dates.
I tried DMax("dtmSupDate") -i.e. the date field that is getting appended within the recordset - but that gets thrown out in the compile.
I also tried DMax("dtmSupDate", "tblTmpSS") on the basis that tblTmpSS is the table which the recordset is based upon but that didn't work either.
I am sure there is probably a fairly standard way of getting the value for the date part of the DateAdd() function but am currently stuck.
Any suggestions?
Thanks
Malcy