Copy record on continuous subform with pop-up forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continuous subform on a main form with a combo box on the subform
that triggers three additional "pop-up" forms in succession so users can
select items from additional combo boxes. I'd like the user to have the
ability to copy a record and paste it as a new one. The command button
wizard creates great code for this, except that when the record is appended
at the end of the subform, the after update event on the first combo box
triggers the first pop-up form, thus defeating the purpose of duplicating the
record for simplicity's sake. What code can I add to bypass the pop-up forms
and directly paste the first record's info into the newly appended record?
Thanks in advance for any help.
 
Without knowing exactly what events are triggering the pop-up forms I
probably can't come up with the most efficient method, but you could
certainly do this...

Set up a global (boolean) variable called something like Duplicate. In the
load event of the main form set that to false. In the code behind your
duplicate button set it to true, and then - in whatever code is opening the
pop-up forms - only do it if the variable is false. And then set it back to
false for later.
 
Back
Top