Page 1 of 1
Duplicate records after update
Posted: Wed Apr 26, 2023 12:41 am
by treed
This screen worked fine for a couple of years. After an update in Jan, it started to create double records when adding a new one or selecting a new one.
Screenshot from 2023-04-25 15-30-42.png
So now I have to delete the second record from the linking table. Any ideas?
Re: Duplicate records after update
Posted: Wed Apr 26, 2023 1:05 am
by treed
In the words of Rosanna Rosanna Dantana. Never mind. There was an attempt at auto saving the form (which didn't work) but now works as part of the system. Some how it was making the duplicate records. Removing this code resolved the issue.
Re: Duplicate records after update
Posted: Thu Apr 27, 2023 4:16 pm
by kev1n
It would be interesting to know what script was used to find the root of the issue. Understanding the specific script or code that was causing the problem could provide valuable insights into how similar issues can be prevented in the future. It would also help to identify any potential flaws in the code that may have caused the issue, and to develop more robust and reliable solutions going forward.
Re: Duplicate records after update
Posted: Thu Apr 27, 2023 6:24 pm
by treed
Rats, I deleted the code. IIRC there were on click events on the subform object on the main form to check if the parent record was saved and if not then to save it. It didn't resolve the issue and it looks like the update now does that automatically, so no one will need to implement work arounds in the future.