E
el zorro
I have 2 forms, Form A and Form B. I have a control button on Form B. When
the user clicks that control, I want to execute VBA code that will close Form
A if it is open. But I can't seem to get the right coding. I've tried
variations of this...
If FormA.Open = True Then Close it AND [do the the instructions here]
ELse [do the instructions here]
End If
THere must be a simple command or function test if Form A is open. I've
tried "If IsLoaded(Forms!Form A)..." but no dice. And, of course, I don't
want an error message if FormA is not open and the program can't find it.
Also, what is the code to use to Close Form A from Form B? (I usually use
DoCmd.Close, but that's when I'm actually in the form I'm closing.
Thanks!
the user clicks that control, I want to execute VBA code that will close Form
A if it is open. But I can't seem to get the right coding. I've tried
variations of this...
If FormA.Open = True Then Close it AND [do the the instructions here]
ELse [do the instructions here]
End If
THere must be a simple command or function test if Form A is open. I've
tried "If IsLoaded(Forms!Form A)..." but no dice. And, of course, I don't
want an error message if FormA is not open and the program can't find it.
Also, what is the code to use to Close Form A from Form B? (I usually use
DoCmd.Close, but that's when I'm actually in the form I'm closing.
Thanks!