Hello, I have been here before so i'll try to make this as understandable as I can
I have a MAIN FORM
I have a DUI FORM
I have a PED FORM
I have TRAFFIC DATA PG2 FORM
On the MAIN FORM I have check boxes to open other forms when needed
Check Box name "PAGE2" when checked opens "TRAFFIC DATA PG2" with codes to link criteria
and auto fill in the "CASENUMBER"
On the TRAFFIC DATA PG2 there are check boxes to open DUI FORM and one to open PED FORM
when needed.
If PED FORM is checked, the PED FORM opens on top of the TRAFFIC DATA PG2 FORM
On the PED FORM there are check boxes to close the PED FORM and return to the MAIN FORM
What I want to do is add something to this close code so that when I close the PED FORM and return to
the MAIN FORM, the TRAFFIC DATA PG2 FORM will close also! Right now it does not close but stays open under the MAIN FORM
check to close PED FORM code:
Private Sub Check24_Click()
If Check24 = True Then
DoCmd.Close
DoCmd.SelectObject acForm, "MAIN FORM"
Forms![MAIN FORM].PAGE2.SetFocus
End If
End Sub
Should I just return to the TRAFFIC DATA PG2 FORM and set focus to this forms close button?
I was trying to circumvent this extra move
I have a MAIN FORM
I have a DUI FORM
I have a PED FORM
I have TRAFFIC DATA PG2 FORM
On the MAIN FORM I have check boxes to open other forms when needed
Check Box name "PAGE2" when checked opens "TRAFFIC DATA PG2" with codes to link criteria
and auto fill in the "CASENUMBER"
On the TRAFFIC DATA PG2 there are check boxes to open DUI FORM and one to open PED FORM
when needed.
If PED FORM is checked, the PED FORM opens on top of the TRAFFIC DATA PG2 FORM
On the PED FORM there are check boxes to close the PED FORM and return to the MAIN FORM
What I want to do is add something to this close code so that when I close the PED FORM and return to
the MAIN FORM, the TRAFFIC DATA PG2 FORM will close also! Right now it does not close but stays open under the MAIN FORM
check to close PED FORM code:
Private Sub Check24_Click()
If Check24 = True Then
DoCmd.Close
DoCmd.SelectObject acForm, "MAIN FORM"
Forms![MAIN FORM].PAGE2.SetFocus
End If
End Sub
Should I just return to the TRAFFIC DATA PG2 FORM and set focus to this forms close button?
I was trying to circumvent this extra move