J
Jeff
I have no problem opening up a 2nd pop-up form that is linked to
another form IF the record from the main form ISN'T new. However when
it is new it NEVER will save the linked record in the 2nd form.
This is what I mean. On the main form if you enter a new record, in
this case a "Person", then click on a command button, it will open up
a second linked form (it filters the 2nd form by it's "PersonID" ). Of
course in this instance the 2nd form will open completely blank since
there are not yet any related records. This 2nd form has the following
code in it's "Before Insert" event.
Me.[PersonID] = Me.OpenArgs
This fills in the "PersonID" on the 2nd form so the two SHOULD be
linked. However as soon as I close the 2nd form, the information IS
NOT SAVED! This ONLY seems to happen if the record on the main form is
NEW. If the record on the main form is a pre-exisitng record, then I
can always open up the 2nd form, and add records, and they are saved.
The only way to prevent this seems to be to actually do a manual SAVE
on the main form after I enter a new record, and then when I click on
the button to open the 2nd form, and enter data, it is always saved. I
tried adding code to the main form that adds a "DoCmd.RunCommand
acCmdSaveRecord" on the "BeforeInsert" event but this doesn't fix the
problem for some ungodly reason...
I don't ever remember this happening in Access 2003. Is this some kind
of bug, or I'm I missing something? Any help is much appreciated.
Thanks!
another form IF the record from the main form ISN'T new. However when
it is new it NEVER will save the linked record in the 2nd form.
This is what I mean. On the main form if you enter a new record, in
this case a "Person", then click on a command button, it will open up
a second linked form (it filters the 2nd form by it's "PersonID" ). Of
course in this instance the 2nd form will open completely blank since
there are not yet any related records. This 2nd form has the following
code in it's "Before Insert" event.
Me.[PersonID] = Me.OpenArgs
This fills in the "PersonID" on the 2nd form so the two SHOULD be
linked. However as soon as I close the 2nd form, the information IS
NOT SAVED! This ONLY seems to happen if the record on the main form is
NEW. If the record on the main form is a pre-exisitng record, then I
can always open up the 2nd form, and add records, and they are saved.
The only way to prevent this seems to be to actually do a manual SAVE
on the main form after I enter a new record, and then when I click on
the button to open the 2nd form, and enter data, it is always saved. I
tried adding code to the main form that adds a "DoCmd.RunCommand
acCmdSaveRecord" on the "BeforeInsert" event but this doesn't fix the
problem for some ungodly reason...
I don't ever remember this happening in Access 2003. Is this some kind
of bug, or I'm I missing something? Any help is much appreciated.
Thanks!