M
Michelle
I have a form "frmLocation" the form has a list box so the user can select
the location to run a query "qurEquipLocation" that is used to produce a
report "rptEquipLocation"
I have it set up so frmLocation opens you select the location and then click
OK when you click OK it opens frmEquipLocation in print preview...this all
works great.
Now what I would like to happen is once the report is open it closes the
frmLocation.
Here is the code I have and it does not do what I want.
I have tried this code on the OK button....
Private Sub cmdOK_Click()
DoCmd.OpenReport "rptEquipLocation", acViewPreview, "qurEquipLocation"
DoCmd.Close acFrom, "frmLocation"
End Sub
And I have have tried this code in the report in the On Open Event
Private Sub Report_Open(Cancel As Integer)
DoCmd.Close acFrom, "frmLocation", acSaveNo
End Sub
I am sure I am just missing one little thing...also if it makes any
difference frmLocation is a popup
the location to run a query "qurEquipLocation" that is used to produce a
report "rptEquipLocation"
I have it set up so frmLocation opens you select the location and then click
OK when you click OK it opens frmEquipLocation in print preview...this all
works great.
Now what I would like to happen is once the report is open it closes the
frmLocation.
Here is the code I have and it does not do what I want.
I have tried this code on the OK button....
Private Sub cmdOK_Click()
DoCmd.OpenReport "rptEquipLocation", acViewPreview, "qurEquipLocation"
DoCmd.Close acFrom, "frmLocation"
End Sub
And I have have tried this code in the report in the On Open Event
Private Sub Report_Open(Cancel As Integer)
DoCmd.Close acFrom, "frmLocation", acSaveNo
End Sub
I am sure I am just missing one little thing...also if it makes any
difference frmLocation is a popup