Print A Form Double-Sided

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Chai
 
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.
 
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
 
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.
 
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
 
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
 
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
 
Back
Top