Hi,
I have a subform that has a command button that is used to open and run a report, only for the specific record shown. The problem is that when I press the command button the report shows behind the form so I can't see it. I've tried to make the form/subform invisiable but it doesn't work. The other reports that I have on a switchboard/reports menu form work fine. When I run those the reports menu form is hidden and the report is shown.
The main form is named frmDivaProfile
the subform is named partnerLinkSubform
here's the code for the command button on the subform
Please help, thanks
I have a subform that has a command button that is used to open and run a report, only for the specific record shown. The problem is that when I press the command button the report shows behind the form so I can't see it. I've tried to make the form/subform invisiable but it doesn't work. The other reports that I have on a switchboard/reports menu form work fine. When I run those the reports menu form is hidden and the report is shown.
The main form is named frmDivaProfile
the subform is named partnerLinkSubform
here's the code for the command button on the subform
Code:
Private Sub cmdOpenrptDivaAssignments_Click()
On Error GoTo Err_cmdOpenrptDivaAssignments_Click
Me.Refresh
Dim stDocName, stlink As String
stDocName = "rptdiva_assignments_single"
stlink = "IDDiva = forms!frmDivaProfile!txtID"
DoCmd.OpenReport stDocName, acPreview
Me.DivaID.SetFocus
Me.Visible = False
Me.Refresh
Exit_cmdOpenrptDivaAssignments_Click:
Exit Sub
Err_cmdOpenrptDivaAssignments_Click:
MsgBox Err.Description
Resume Exit_cmdOpenrptDivaAssignments_Click
End Sub
Please help, thanks