Ok, I am pulling up this back up as I finally got around to trying so of the code Tom suggested in this thread.
http://www.alphasoftware.com/alphafo...ly-not-working
What I am trying to do is duplicate a record that consist of one record in the parent table, multiple records in the items table and one record in the sp_art table
I tried the code Tom suggested and it seems very slow plus it causes the tabbed object on the form to switch tabs and then flash.
My old code is way faster and does not cause any tab changing or flashing. This code duplicates the parent record and then using a temp_db copies the records from the one to many child into it and then appends that info into the actual child table used by the set.
The reason I even tried the code Tom posted is because I need to also duplicate a record that is in a one to one of the parent.
Using the same method I used in my code of copy to temp and then append, I end up getting a error "Index not Open" or something like that when I try to do anything on the duplicated record in the form.
I also tries to add to Tom's modified code to see if I could pull that child record into the a new record. No mater what I tried it always pulled the wrong data and seemed to be pulling data from the items table.
I have also attached the code from both Tom's example that has been modified for my tables and also my older code.
Here is a video that I hope explains it better. Please excuse the background noise but it is 102 degrees so I have a fan blowing on me.
Here is a link to the code. The "est_dup_new" is based on what Tom posted and the "est_dup" is my code without the code to try and pull the single record from the other child table.
http://www.shopcalmanager.com/dl/est...08-12-2016.txt
If anyone can point me in the right direction it would be greatly appreciated.
http://www.alphasoftware.com/alphafo...ly-not-working
What I am trying to do is duplicate a record that consist of one record in the parent table, multiple records in the items table and one record in the sp_art table
I tried the code Tom suggested and it seems very slow plus it causes the tabbed object on the form to switch tabs and then flash.
My old code is way faster and does not cause any tab changing or flashing. This code duplicates the parent record and then using a temp_db copies the records from the one to many child into it and then appends that info into the actual child table used by the set.
The reason I even tried the code Tom posted is because I need to also duplicate a record that is in a one to one of the parent.
Using the same method I used in my code of copy to temp and then append, I end up getting a error "Index not Open" or something like that when I try to do anything on the duplicated record in the form.
I also tries to add to Tom's modified code to see if I could pull that child record into the a new record. No mater what I tried it always pulled the wrong data and seemed to be pulling data from the items table.
I have also attached the code from both Tom's example that has been modified for my tables and also my older code.
Here is a video that I hope explains it better. Please excuse the background noise but it is 102 degrees so I have a fan blowing on me.
Here is a link to the code. The "est_dup_new" is based on what Tom posted and the "est_dup" is my code without the code to try and pull the single record from the other child table.
http://www.shopcalmanager.com/dl/est...08-12-2016.txt
If anyone can point me in the right direction it would be greatly appreciated.
Comment