I have a mainform and a subform. they are linked by an autonumber that are generated from the mainform. I have setup one to many relationship. one on the main form and many on the subform. I used the Autonumber generated from the main form. i utilized the Openform, acformadd to create a new record.everything is smooth until the user wants to cancel or undo the creation of a new records. The problem i face is when the information is fill in the main form and then move to the subform it gets save so when i do undo on the mainform or the other way around when user switch from main to sub and back to main again nothing happends with the undo. Another issue i face in some instance i can undo the mainform but there are some left over record in the subform. I know there is an option in the relationship i can utilized cascading delete but i am not to fond of it. I need some advice on how the best practise would look like.
my currently code is to much complexed that i some times dont even understand it myself.
I have a delete query that execute when the user cancel the creation of a new record. the criteria is the hidden autogenerated field.
It works somewhat but the code is not clean i feel like there most be a better approach to this problem as this is very common problem.
thanks in advance
my currently code is to much complexed that i some times dont even understand it myself.
I have a delete query that execute when the user cancel the creation of a new record. the criteria is the hidden autogenerated field.
It works somewhat but the code is not clean i feel like there most be a better approach to this problem as this is very common problem.
thanks in advance