lacampeona
Registered User.
- Local time
- Tomorrow, 00:28
- Joined
- Dec 28, 2015
- Messages
- 392
Hello experts,
I have two tables, tblA and tblB.
In tbl A are all the items, tblB is storing the daily usage of the items. Both tables has field status and this status field must be the same in both tables.
I am using this line of code to perform status update from tblB to the tbl A.
I am using Unload event from my formB.
On Unload event of the form, I synchronize the "2nd" table with the first?
This is working perfectly but what I notice is that sometimes the status is not always from the last record. Sometimes the status is from some record earlier.
What I can do?
Is my event that I am using correct? How to make correct that my update is always from the last record?On which event is the best solution to use the code?
I am sure that when I save the record and close the form the status is updared correctly but then suddenly after some time the status is from some record earlier.
hmmmm
Thank you
I have two tables, tblA and tblB.
In tbl A are all the items, tblB is storing the daily usage of the items. Both tables has field status and this status field must be the same in both tables.
I am using this line of code to perform status update from tblB to the tbl A.
I am using Unload event from my formB.
currentdb.execute "UPDATE tblA SET tblA.Status= '" & Me!Status & "' WHERE tblA.ID = " & Me.ID
On Unload event of the form, I synchronize the "2nd" table with the first?
This is working perfectly but what I notice is that sometimes the status is not always from the last record. Sometimes the status is from some record earlier.
What I can do?
Is my event that I am using correct? How to make correct that my update is always from the last record?On which event is the best solution to use the code?
I am sure that when I save the record and close the form the status is updared correctly but then suddenly after some time the status is from some record earlier.
hmmmm
Thank you