How to set report-margin by code

N

Niels

Hello Forum,
how can i change the left (and top) page margin of my
report by code. I try to do this by using

Me.Left = 2000

in different events of the report (open, format a
range ...) but I get always the errormessage "Property was
read only and could not change".

Thanks in advance for any help.
Niels
 
F

fredg

Hello Forum,
how can i change the left (and top) page margin of my
report by code. I try to do this by using

Me.Left = 2000

in different events of the report (open, format a
range ...) but I get always the errormessage "Property was
read only and could not change".

Thanks in advance for any help.
Niels

You can set the report's margins using code if you open the report by
code in design view.
See the PrtMip Property in VBA help.

Note:
The PrtMip property setting is read/write in Design view and read-only
in other views.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top