By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,482 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

cmdButton to Print 3 copies of record in Form view ?

P: n/a
cmdButton to Print 3 copies of record in Form view ?

cmdButton will print 1 but I need 3 copies of the one Form record.
--
Dave Allison
Nov 12 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"David Allison" <da***********@zzzzzzzzzblueyonder.co.uk> wrote
in news:fL*************@news-binary.blueyonder.co.uk:
cmdButton to Print 3 copies of record in Form view ?

cmdButton will print 1 but I need 3 copies of the one Form
record.


Open the form's code module and find the statement in your button's
On Click event that starts with docmd..... Copy the line and paste
it in twice.

Bob Q
Nov 12 '05 #2

P: n/a
> cmdButton to Print 3 copies of record in Form view ?

cmdButton will print 1 but I need 3 copies of the one Form record.


If you are opening a report to print the current record, you can use the
following approach:

'***EXAMPLE START
Dim iCounter As Integer
For iCounter = 1 To 3
DoCmd.OpenReport "MyReport", , , "ID=" & Me.ID
Next
'***EXAMPLE END

I usually provide a textbox in which the user can type in the desired number of
copies (it always contains a "default" value) and retrieve that value for use in
the code.

If you are printing out the form (which I wouldn't normally recommend), you
could use the "PrintOut" method of the "DoCmd" object which has a "Copies"
parameter that will allow you to specify the number of copies. It is difficult,
however, to filter the printout to one record unless it will always fit on one
page.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #3

P: n/a
> > cmdButton to Print 3 copies of record in Form view ?

cmdButton will print 1 but I need 3 copies of the one Form record.
If you are opening a report to print the current record, you can use the
following approach:

'***EXAMPLE START
Dim iCounter As Integer
For iCounter = 1 To 3
DoCmd.OpenReport "MyReport", , , "ID=" & Me.ID
Next
'***EXAMPLE END

I usually provide a textbox in which the user can type in the desired

number of copies (it always contains a "default" value) and retrieve that value for use in the code.

If you are printing out the form (which I wouldn't normally recommend), you could use the "PrintOut" method of the "DoCmd" object which has a "Copies"
parameter that will allow you to specify the number of copies. It is difficult, however, to filter the printout to one record unless it will always fit on one page.

--
Bruce M. Thompson, Microsoft Access MVP
Thanks Bruce though I wonder why .... If you are printing out the form (which I wouldn't normally recommend)

(Its a receipt - 3 copies)

--
Dave Allison ~ Scotland
Nov 12 '05 #4

P: n/a
>
cmdButton to Print 3 copies of record in Form view ?

cmdButton will print 1 but I need 3 copies of the one Form
record.


Open the form's code module and find the statement in your button's
On Click event that starts with docmd..... Copy the line and paste
it in twice.

Bob Q


Thanks Bob ~ works a treat.

--
Dave Allison
Nov 12 '05 #5

P: n/a
> Thanks Bruce though I wonder why ....
If you are printing out the form (which I wouldn't normally recommend)

(Its a receipt - 3 copies)


Most forms aren't formatted for printing (it's typical to find a gray color and
3D textboxes and the like). I'm not saying that I make a point of recommending
*against* printing a form; there's just more control in printing with a report -
that's what a report is for.

:-)
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #6

P: n/a
> > Thanks Bruce though I wonder why ....
If you are printing out the form (which I wouldn't normally recommend) (Its a receipt - 3 copies)


Most forms aren't formatted for printing (it's typical to find a gray

color and 3D textboxes and the like). I'm not saying that I make a point of recommending *against* printing a form; there's just more control in printing with a report - that's what a report is for.

OK thanks I have designed a prototype Form (no gray etc) but when it goes
live I will look at making a report.
The three receipts are for when a client books - data entry on the form -
then print out the 3 copies of the form/receipt.

Dave Allison
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<

Nov 12 '05 #7

P: n/a
> OK thanks I have designed a prototype Form (no gray etc) but when it goes
live I will look at making a report.


When you're ready, you can save your form as a report and then tweak it from
there. That's a great time saver.

:-)
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #8

P: n/a
> > OK thanks I have designed a prototype Form (no gray etc) but when it
goes
live I will look at making a report.
When you're ready, you can save your form as a report and then tweak it

from there. That's a great time saver.

Yup that works ! but problem is I have to print out (only) 3 copies of the
one record.
The form is designed as a booking/receipt form.

--
Dave Allison ~ Scotland
Nov 12 '05 #9

P: n/a
> Yup that works ! but problem is I have to print out (only) 3 copies of the
one record.


Problem? Are you saying that the code I provided you with, which prints 3 copies
of the selected record, won't work for you? Remember, you would only be using
the report to print and only using the provided code.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.