Open report from a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I work with Access 97 and 2000.
I have a form named "_F_Generate_Credits" and opend by the following instruction in a macros :
DoCmd.OpenForm "_F_Generate_Credits", , , , , acDialog, CreditOrDebit
In this form, I have a button which open a report named "_R_Preview Credits" with the following instruction :
DoCmd.OpenReport "_R_Preview Credits", acViewPreview

My goal is to display the report in front of the form.
My problem is when the report "_R_Preview Credits" is open, it appears behind the form
"_F_Generate_Credits" and I can not activate it until the form is closed.
I know that the problem comes from the "acDialog" option of the OpenForm, but I need to conserve it.

Any idea ?
Thanks in advance.
NicoB.
 
Following this line:
DoCmd.OpenReport "_R_Preview Credits", acViewPreview
add the following:
Me.Visible = False

This will make the form invisible without closing it and you will see the
report.
--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org


NicoB said:
Hi everybody,

I work with Access 97 and 2000.
I have a form named "_F_Generate_Credits" and opend by the following instruction in a macros :
DoCmd.OpenForm "_F_Generate_Credits", , , , , acDialog, CreditOrDebit
In this form, I have a button which open a report named "_R_Preview
Credits" with the following instruction :
 
Back
Top