Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subform and reports

Status
Not open for further replies.

Janet95

Technical User
Jun 6, 2006
45
US
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
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 [ponytails2]
 
Hi, I was able to get an answer to this question in another thread.

So I was able to get if fixed.

[peace]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top