I have a report that is filtered by choosing a number from a combo box on a form then a command button opens the form and hides the form. But the report opens up behind the switch board.
Anybody have any idea why this particular report does this?
My comand button code is below:
Private Sub Open_Shift_Scrap_Report_Click()
On Error GoTo Err_Open_Shift_Scrap_Report_Click
Dim stDocName As String
stDocName = "R-Machine_Scrap_By_Shift"
DoCmd.OpenReport stDocName, acPreview, , "[ShiftCode]=" & Me.txtshiftcode
DoCmd.Close acForm, "F-Select_Shift_Code", acSaveNo
Exit_Open_Shift_Scrap_Report_Click:
Exit Sub
Err_Open_Shift_Scrap_Report_Click:
MsgBox err.Description
Resume Exit_Open_Shift_Scrap_Report_Click
End Sub
Anybody have any idea why this particular report does this?
My comand button code is below:
Private Sub Open_Shift_Scrap_Report_Click()
On Error GoTo Err_Open_Shift_Scrap_Report_Click
Dim stDocName As String
stDocName = "R-Machine_Scrap_By_Shift"
DoCmd.OpenReport stDocName, acPreview, , "[ShiftCode]=" & Me.txtshiftcode
DoCmd.Close acForm, "F-Select_Shift_Code", acSaveNo
Exit_Open_Shift_Scrap_Report_Click:
Exit Sub
Err_Open_Shift_Scrap_Report_Click:
MsgBox err.Description
Resume Exit_Open_Shift_Scrap_Report_Click
End Sub