roland_access
Registered User.
- Local time
- Today, 08:03
- Joined
- Feb 13, 2002
- Messages
- 35
I have a form linked to a table containing stock information. When someone changes the stock amount, i want what stock item it was, when (time and date) it was changed and what it was changed to stored in another table.
I got the following code to do this on an after update
set MyRecords = currentdb.openrecordset("Log", dbopendynaset)
With MyRecords
.addnew
!StockID = Me.StockIDCode
.update
end with
MyRecords.close
Now this works fine for one field, but i then need to enter the current date and time in the next field and what was changed in the next to complete the record.
I tried this using .Edit instead of .addnew and it just edited the top most record, not the new one. Any ideas please?
I got the following code to do this on an after update
set MyRecords = currentdb.openrecordset("Log", dbopendynaset)
With MyRecords
.addnew
!StockID = Me.StockIDCode
.update
end with
MyRecords.close
Now this works fine for one field, but i then need to enter the current date and time in the next field and what was changed in the next to complete the record.
I tried this using .Edit instead of .addnew and it just edited the top most record, not the new one. Any ideas please?