XXX How do I store a record I'm pointing to from one form to another? XXX

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

Guest

I have two forms "Form A" and "Form B". Form A, has a command button that call "Form B" and closes "Form A". I need to store the current Record on "Form A" and then when I return from "Form B" I need to return to that record that I left. Remember: I closed "Form A", so I lose the record pointer. Is this possible? *** I need to close the first form, I realize I can't make the form modal and update the second.(this is not a solution) Thanks**
 
I have two forms "Form A" and "Form B". Form A, has a command button that call "Form B" and closes "Form A". I need to store the current Record on "Form A" and then when I return from "Form B" I need to return to that record that I left. Remember: I closed "Form A", so I lose the record pointer. Is this possible? *** I need to close the first form, I realize I can't make the form modal and update the second.(this is not a solution) Thanks***

Could you explain why it is ESSENTIAL to close FormA? It makes life a
lot more difficult if you do! It is possible to save the current
record on FormA (using DoCmd.RunCommand acCmdSaveRecord or,
equivalently, Me.Dirty = False), and make the form invisible.

If you must indeed close the form, I'd suggest passing the current
record's Primary Key value to FormB in the OpenArgs parameter of the
OpenForm event, and then pass it back when FormB closes. Storing the
value in a one-record table is an alternative; a Global Variable is
possible but really not recommended if it's a multiuser system.
 
Back
Top