Solved Call Report Page Setup by VBA or Macro (1 Viewer)

Bounthong

New member
Local time
Today, 15:30
Joined
Feb 28, 2023
Messages
4
Dear Expert,
I want to call report Page Setup (where I can select printer, change paper size, margin, ...), which is normally can be accessed by right mouse click and then select from popup menu. In my case I want to avoid all shortcut keys/popup menu, so would that possible to call Page Setup from my report (let say implement through the command button on the report view).
Thank you.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 04:30
Joined
May 21, 2018
Messages
8,529
Look at the Docmd.RunCmd acCmdPageSetup
acCmdPageSetup

page.jpg
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:30
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

You could try something like:
Code:
DoCmd.RunCommand acCmdPrint
Sent from phone...

Edit: Oops, too slow and used the wrong constant. Sorry.
 

Bounthong

New member
Local time
Today, 15:30
Joined
Feb 28, 2023
Messages
4
Thanks theDBguy and MajP for you quick reply. I have tried with Docmd.RunCommand acCmdPrint, I have got error message 2585 (this action can't be carried out while processing a form or report event). What is your advise?
Thanks
 

Bounthong

New member
Local time
Today, 15:30
Joined
Feb 28, 2023
Messages
4
Hi,

I have resolved my problem already with another method. I disabled all menus and short cut menu, and created custom ribbons for my purpose instead.

Thanks.
 

Users who are viewing this thread

Top Bottom