A
auke
Hi,
I want to create something similar to a switchboard, but then also for
queries. Therefor I'm creating a form with a few pushbuttons. When I
have a put a pushbutton on the form, I cancel the pushbutton-wizard
(the solution to my problem is also in this wizard, but that generates
lots of code) and then I go to the properties of the push button.
Under the tab "events" I can place the following code in the OnClick
event:
=docmd.openreport("Reportname")
This works!
However, the report is then automatically printed. To circumvent this,
I want to open the report in the "print preview" mode. However the
following codes don't work:
=docmd.openreport("Reportname";"acViewPreview")
=docmd.openreport("Reportname;acViewPreview")
docmd.openreport "Reportname"; acViewPreview
In the last case, Access notifies that there is no macro called docmd
(that's fair).
Finally, my question: Is there a way to open a report/query/form in a
other view mode than the default view mode without creating an event
procedure or a macro?
Thanks in advance!
Ps. I've got Access 2000 and the localisation is Dutch (hence the ;
instead of the , ).
I want to create something similar to a switchboard, but then also for
queries. Therefor I'm creating a form with a few pushbuttons. When I
have a put a pushbutton on the form, I cancel the pushbutton-wizard
(the solution to my problem is also in this wizard, but that generates
lots of code) and then I go to the properties of the push button.
Under the tab "events" I can place the following code in the OnClick
event:
=docmd.openreport("Reportname")
This works!
However, the report is then automatically printed. To circumvent this,
I want to open the report in the "print preview" mode. However the
following codes don't work:
=docmd.openreport("Reportname";"acViewPreview")
=docmd.openreport("Reportname;acViewPreview")
docmd.openreport "Reportname"; acViewPreview
In the last case, Access notifies that there is no macro called docmd
(that's fair).
Finally, my question: Is there a way to open a report/query/form in a
other view mode than the default view mode without creating an event
procedure or a macro?
Thanks in advance!
Ps. I've got Access 2000 and the localisation is Dutch (hence the ;
instead of the , ).