Print A Form Double-Sided

G

Guest

Just like to know if there's a code that I could write to print a form
double-sided.
Thanks.

Chai
 
D

Douglas J. Steele

First of all, forms aren't intended to be printed: that's what reports are
for.

Second, duplex printing is a function of the printer and the print drivers,
not of Access.
 
G

Guest

Okay, I can copy a form over as a report. I've set the printer to print
duplex. What I want to is write codes to print two different forms. Can
this be done?

For Example, I have frmForm1 and frmForm2, will the codes below work?

stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close
 
D

Douglas J Steele

That'll only print one form (frmForm2, since that's the only value that
would be stored in stDocName)

You could try:

stDocName = "frmForm1"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close

stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


Of course, you're still trying to print forms, and as I already told you,
forms aren't intended to be printed.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chai said:
Okay, I can copy a form over as a report. I've set the printer to print
duplex. What I want to is write codes to print two different forms. Can
this be done?

For Example, I have frmForm1 and frmForm2, will the codes below work?

stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


Douglas J. Steele said:
First of all, forms aren't intended to be printed: that's what reports are
for.

Second, duplex printing is a function of the printer and the print drivers,
not of Access.
 
G

Guest

I already tried the codes you suggested, but it sends out two print job.
What I want is to have it print two different forms with one print job.
Also, is there a way to print one sheet landscape and another portrait?
Thanks.

Douglas J Steele said:
That'll only print one form (frmForm2, since that's the only value that
would be stored in stDocName)

You could try:

stDocName = "frmForm1"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close

stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


Of course, you're still trying to print forms, and as I already told you,
forms aren't intended to be printed.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chai said:
Okay, I can copy a form over as a report. I've set the printer to print
duplex. What I want to is write codes to print two different forms. Can
this be done?

For Example, I have frmForm1 and frmForm2, will the codes below work?

stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


Douglas J. Steele said:
First of all, forms aren't intended to be printed: that's what reports are
for.

Second, duplex printing is a function of the printer and the print drivers,
not of Access.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Just like to know if there's a code that I could write to print a form
double-sided.
Thanks.

Chai
 
D

Douglas J. Steele

Sorry, but there's no way to combine two reports (or forms) into a single
print job, nor can you change the orientation.

If you use a report, you can have two subreports on a single report, so that
printing the one report will print both subreports.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Chai said:
I already tried the codes you suggested, but it sends out two print job.
What I want is to have it print two different forms with one print job.
Also, is there a way to print one sheet landscape and another portrait?
Thanks.

Douglas J Steele said:
That'll only print one form (frmForm2, since that's the only value that
would be stored in stDocName)

You could try:

stDocName = "frmForm1"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" &
Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close

stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" &
Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


Of course, you're still trying to print forms, and as I already told you,
forms aren't intended to be printed.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chai said:
Okay, I can copy a form over as a report. I've set the printer to
print
duplex. What I want to is write codes to print two different forms.
Can
this be done?

For Example, I have frmForm1 and frmForm2, will the codes below work?

stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" &
Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close


:

First of all, forms aren't intended to be printed: that's what
reports are
for.

Second, duplex printing is a function of the printer and the print drivers,
not of Access.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Just like to know if there's a code that I could write to print a
form
double-sided.
Thanks.

Chai
 
Joined
May 22, 2011
Messages
2
Reaction score
0
How i use this code in access 2007 pls help me

stDocName = "frmForm1"
stDocName = "frmForm2"
stLinkCriteria = "[tblTestIndex.Lab No]=" & "'" & Me![tblTestIndex.LAB
NO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close
 

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