Report opens behind form

  • Thread starter Thread starter stephendeloach via AccessMonster.com
  • Start date Start date
S

stephendeloach via AccessMonster.com

How do i make a report ontop of my form? I have a switchboard named "Panel"
from there i click "Runs Worksheet" and it opens behind the "Panel". Also, I
have a Report named "Single Rig Report" when I click on it, it opens ontop,
but when i X out of it my Panel is gone?? Im lost... Help!
 
Use this to open a report in the preview mode.

DoCmd.OpenReport ,"rptYourReportName", acViewPreview
DoCmd.SelectObject acReport,"rptYourReportName", False
 
Now it comes up with "Compile Error: Argument not optional."
Private Sub Report_Activate() <-----(that is in yellow)
DoCmd.OpenReport , "rptRig Comparison", acViewPreview
DoCmd.SelectObject acReport, "rptRig Comparison", False

End Sub
That is what I have on Activate and does the same thing On Open. If i change
the report to Popup: Yes. It comes up on top but with no print button,
design view, etc...
 
You should put the code I suggested in the Switchboard form. Look for
something like this:

DoCmd.OpenReport rst![Argument], acPreview

And put this line under it:
DoCmd.SelectObject acReport, rst![Argument], False
 
Private Sub Rig_Comparison_Click()
On Error GoTo Err_Rig_Comparison_Click

Dim stDocName As String

stDocName = "Rig Comparison"
DoCmd.OpenReport stDocName, acPreview
DoCmd.SelectObject acReport, rst![Argument], False
Me.Visible = False

Exit_Rig_Comparison_Click:
Exit Sub

Err_Rig_Comparison_Click:
MsgBox Err.Description
Resume Exit_Rig_Comparison_Click


that is what I have... It is asking for an object.. Im new with this, thanks
for the quick reply.
You should put the code I suggested in the Switchboard form. Look for
something like this:

DoCmd.OpenReport rst![Argument], acPreview

And put this line under it:
DoCmd.SelectObject acReport, rst![Argument], False
Now it comes up with "Compile Error: Argument not optional."
Private Sub Report_Activate() <-----(that is in yellow)
[quoted text clipped - 15 lines]
 
DoCmd.SelectObject acReport, stDocName , False



stephendeloach via AccessMonster.com said:
Private Sub Rig_Comparison_Click()
On Error GoTo Err_Rig_Comparison_Click

Dim stDocName As String

stDocName = "Rig Comparison"
DoCmd.OpenReport stDocName, acPreview
DoCmd.SelectObject acReport, rst![Argument], False
Me.Visible = False

Exit_Rig_Comparison_Click:
Exit Sub

Err_Rig_Comparison_Click:
MsgBox Err.Description
Resume Exit_Rig_Comparison_Click


that is what I have... It is asking for an object.. Im new with this, thanks
for the quick reply.
You should put the code I suggested in the Switchboard form. Look for
something like this:

DoCmd.OpenReport rst![Argument], acPreview

And put this line under it:
DoCmd.SelectObject acReport, rst![Argument], False
Now it comes up with "Compile Error: Argument not optional."
Private Sub Report_Activate() <-----(that is in yellow)
[quoted text clipped - 15 lines]
have a Report named "Single Rig Report" when I click on it, it opens ontop,
but when i X out of it my Panel is gone?? Im lost... Help!
 
OK that works but now it makes the switchboard (Panel) go away when I close
the report...?
DoCmd.SelectObject acReport, stDocName , False
Private Sub Rig_Comparison_Click()
On Error GoTo Err_Rig_Comparison_Click
[quoted text clipped - 29 lines]
 
I'm not sure why the line

Me.Visible = False


is there . Put a single quote in front of it loike so:

'Me.Visible = False


stephendeloach via AccessMonster.com said:
OK that works but now it makes the switchboard (Panel) go away when I close
the report...?
DoCmd.SelectObject acReport, stDocName , False
Private Sub Rig_Comparison_Click()
On Error GoTo Err_Rig_Comparison_Click
[quoted text clipped - 29 lines]
have a Report named "Single Rig Report" when I click on it, it opens ontop,
but when i X out of it my Panel is gone?? Im lost... Help!
 
Back
Top