Hi, all!
I've been wrestling with this for a bit, with the error messages changing every time I change the code, but nothing's quite working.
I've got three forms open. When I hit a button on Form3, I want it to close itself and Form2 (while first setting a control on Form1).
OK, why doesn't this work?
The offending line (closing Form2) gives me an "Object Name required" error at run-time, and changing it to
gives me a type-mismatch error(!?).
Is there an approved way to close a form from another, or something else I'm missing here?
TIA,
ATAIntern:-I
I've been wrestling with this for a bit, with the error messages changing every time I change the code, but nothing's quite working.
I've got three forms open. When I hit a button on Form3, I want it to close itself and Form2 (while first setting a control on Form1).
OK, why doesn't this work?
Code:
Private Sub cmdSelect_Click()
Forms!Form1!Control1 = Me.Control1
DoCmd.Close acForm, Form2
DoCmd.Close
End Sub
The offending line (closing Form2) gives me an "Object Name required" error at run-time, and changing it to
Code:
DoCmd.Close "Form2"
gives me a type-mismatch error(!?).
Is there an approved way to close a form from another, or something else I'm missing here?
TIA,
ATAIntern:-I