Hello all,
I'm using A97 on W2K.
I've got a form, say "frmMain" which contains a sub form, say
"frmMainSub". This sub form is a "continue mode" style form (traducted
from french. don't know the exact term in english). So I can add,
remove, modify records "live".
What I must do (asked by the boss!!), it's to use another form, say
"frmChoice", which would give users the possibility to select one or
more record from a fixed number of records, to populate afterward
frmMainSub, by clicking checkboxes. This form is more "graphical" and
visual and fast for the user than entering each line in frmMainSub.
But, I've to run the "frmMainSub.AfterInsert" function after inserting
these record programaticaly because some updates are done.
Right now, I've achieved all that. I added a button on frmMain which
open dialog frmChoice and I retreive selected data. Then (all from
frmMain module):
1- I add the first record to the table source of frmMainSub.
2- I requery frmMainSub.
3- I FindFirst the added record.
4- I run frmMainSub.AfterInsert (wich update a couple of fields
directly in frmMainSub. For some reasons, I don't want to just
cut&paste this code and run it in an update query in frmMain module.)
5- I run DoCmd.RunCommand acCmdSaveRecord
6- I redo all this with the second selected choice, ... third, ....
But, it looks like point #5 do not work. I end up with frmMainSub
populated with lines added but not updated (as if point #4 did
nothing). Except for the last inserted line which as been updated
(visualy in frmMainSub) but not in the table source.
Anybody has solution to this situation. Other suggestion to acheive
this similarly.
Thanks for your time.
Yannick