G
Guest
Just like to know if there's a code that I could write to print a form
double-sided.
Thanks.
Chai
double-sided.
Thanks.
Chai
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.
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
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
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