doulostheou
Registered User.
- Local time
- Today, 04:10
- Joined
- Feb 8, 2002
- Messages
- 314
I have multiple forms open that are working in conjunction. A button click on Form1 will either create a new record or update a field in a particular record on Form2 (Form2 is a continuous form). I then reflect these changes by requerying Form2.
My problem is that if a user is editing Form2 but has not saved their changes, I have a problem because the code cannot requery until the changes have been saved or update the record if they are editing the record I am trying to update. I have widdled down the problem by detecting if the form is dirty. What I now want to do is save the record on that form, if it is dirty. I know how to do this, if I am on the form (Docmd.Runcommand acCmdSaveRecord), but I cannot figure out how to do this if I am on a different form, as the above would obviously try to save the record on Form1 and not Form2.
I have a few alternative approaches that I am going to try, but even if I figure out how to make this work, it would be helpful to know if there was a way to save the current record on Form2 from Form1.
My problem is that if a user is editing Form2 but has not saved their changes, I have a problem because the code cannot requery until the changes have been saved or update the record if they are editing the record I am trying to update. I have widdled down the problem by detecting if the form is dirty. What I now want to do is save the record on that form, if it is dirty. I know how to do this, if I am on the form (Docmd.Runcommand acCmdSaveRecord), but I cannot figure out how to do this if I am on a different form, as the above would obviously try to save the record on Form1 and not Form2.
I have a few alternative approaches that I am going to try, but even if I figure out how to make this work, it would be helpful to know if there was a way to save the current record on Form2 from Form1.