chris-uk-lad
Registered User.
- Local time
- Yesterday, 20:16
- Joined
- Jul 8, 2008
- Messages
- 271
Hi,
Hitting an issue with an Access table, im trying to insert a value into the last line of a table as a customised trailer but can't seem to enter it into the very last row.
Im currently trying the criteria below but how do i link the recordset, having found the last 'occupied' row, to the insert query using the next blank row?
Many Thanks
Hitting an issue with an Access table, im trying to insert a value into the last line of a table as a customised trailer but can't seem to enter it into the very last row.
Im currently trying the criteria below but how do i link the recordset, having found the last 'occupied' row, to the insert query using the next blank row?
Code:
Set recordNum = CurrentDb.OpenRecordset("SELECT * FROM Table1", dbOpenDynaset)
recordNum.MoveLast
lastNum = recordNum.RecordCount
CurrentDb.Execute "INSERT INTO Table1 () VALUES ('T" & Format(DateTime.Now, "yyyymmddhhmmss") & "')"
Many Thanks