Application.Printer = Application.Printers("Cheque Printer")
DoCmd.OpenReport "rCheque", 2, , "PropNum = " & gblPropNum
Set rpt = Reports!rCheque
With rpt.Printer
.DefaultSize = False
.PaperSize = acPRPSUser
.ItemSizeHeight = 5301
.ItemSizeWidth = 15252
End With
The code runs without generating an error, but invariably opens the report
in 'Letter' paper size.
I have set up a custom paper size called 'Cheque' which I can manually set
and all works fine.
But I need to distribute the app in an mde, so want to change the paper size
when the report is opened as above.
Has anyone got this to work?
--
Bob Darlington
Brisbane
"Bob Darlington" <b...@notheredpcman.com.au> wrote in message
news:4cbbf236$0$25360$afc3...@news.optusnet.com.au...
--
Bob Darlington
Brisbane
"Arvin Meyer" <arv...@invalid.org> wrote in message
news:-9mdnYm4zfNQ3yHR...@earthlink.com...
Actually all you need to do is create the printer size on the printer
server which frequently is the file server.
Go into the list of Printers under the Settings button from the Start
menu. You may need to do this on the print server and you might need
admin privilages. Then click on File >> Server Properties Then you
can create a new form with the sizes you want on it as well as a name.
Then you can follow the below steps inside Access to choose the just
created Paper Size. Go into the design of the report, Click
'File',Page Setup', Click the 'Page' tab., Select 'Specific Printer',,
Pick the printer you are using., Click 'Properties' then the 'Paper'
tab., In 'Paper Size' select 'Custom'. and choose your just created
Paper Size.
Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
--
Bob Darlington
Brisbane
"Tony Toews" <tto...@telusplanet.net> wrote in message
news:594sb613vvdp3ddfb...@4ax.com...
Right but are the users creating that paper size on the clients
printer server?
--
Bob Darlington
Brisbane
"Tony Toews" <tto...@telusplanet.net> wrote in message
news:re0tb6902da88ojsl...@4ax.com...
Well, darn then I don't have a clue.
Tony (sorry to be so unhelpful.)
--
Bob Darlington
Brisbane
"Tony Toews" <tto...@telusplanet.net> wrote in message
news:volvb6lqghla3jhej...@4ax.com...
> It seems that no-one has successfully used the Printer object for
> custom paper sizes.
Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.
--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/
--
Bob Darlington
Brisbane
"David-W-Fenton" <NoE...@SeeSignature.invalid> wrote in message
news:Xns9E18C477462E8f9...@74.209.136.99...
Yanto
On Oct 22, 7:45 am, "Bob Darlington" <b...@notheredpcman.com.au>
wrote:
> David,
> I'm still testing in the mdb on my development PC and I can't get it to work
> there.
> Hopefully, if I can get it to work in the mdb, it will (might) work in the
> mde at the client site.
> That's my goal anyway.
> I still haven't heard from anyone who has successfully done so in either
> file form.
>
> --
> Bob Darlington
> Brisbane"David-W-Fenton" <NoEm...@SeeSignature.invalid> wrote in message
>
> news:Xns9E18C477462E8f9...@74.209.136.99...
>
>
>
> > "Bob Darlington" <b...@notheredpcman.com.au> wrote in
> >news:4cbfe5de$0$10379$afc3...@news.optusnet.com.au:
>
> >> It seems that no-one has successfully used the Printer object for
> >> custom paper sizes.
>
> > Have you compared this in MDB vs. MDE? I recall that you're trying
> > to do this in an MDE, and I'm just wondering if that is the source
> > of the problem.
>
> > --
> > David W. Fenton http://www.dfenton.com/
> > contact via website only http://www.dfenton.com/DFA/- Hide quoted text -
>
> - Show quoted text -
Have you tried the old fashioned method (AK2) using things like PRTMIP &
DEVMODE?
Phil
--
Bob Darlington
Brisbane
"Phil" <ph...@stantonfamily.co.uk> wrote in message
news:ia0o79$h3v$1...@speranza.aioe.org...
--
Bob Darlington
Brisbane
"yanto" <yant...@gmail.com> wrote in message
news:0428155f-de19-4e58...@29g2000prb.googlegroups.com...
Don't think that is a problem
Phil
--
Bob Darlington
Brisbane
"Phil" <ph...@stantonfamily.co.uk> wrote in message
news:ia2duk$e0d$1...@speranza.aioe.org...
Er um deep crimson
Of course you're right
apologies
Phil
Set objAccess = New Access.Application
With objAccess
lngRet = apiSetForegroundWindow(.hWndAccessApp)
lngRet = apiShowWindow(.hWndAccessApp, SW_NORMAL)
lngRet = apiShowWindow(.hWndAccessApp, SW_MAXIMIZE)
.OpenCurrentDatabase CurrentDir & "cheques.mdb"
.DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum
End With
--
Bob Darlington
Brisbane
"Bob Darlington" <b...@notheredpcman.com.au> wrote in message
news:4cbbf236$0$25360$afc3...@news.optusnet.com.au...