473,803 Members | 3,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Number of Copies....

Tim
Is it possible to select the number of copies of a report from a variable
input in a form ?
--

Tim Patton
ICT Controller
Springfarm Architectural Mouldings Ltd
Antrim, N.Ireland
BT41 2RU

Tel: 028 9442 8288 Fax: 028 9442 8244

Email: tp*****@sammoul dings.co.uk <mailto:tp***** @sammouldings.c o.uk>
Web: http://www.sammouldings.co.uk/
Moulding the Future ... Today
SAM Mouldings computer systems are protected from viruses by Sophos Anti
Virus.

Privileged/Confidential information and/or copyright material may be
contained in this email. The information and material is only intended for
the use of the addressee. If you receive this email by mistake, please
advise the sender immediately by using the reply facility in your email
software and delete the message from your system. Thank you.
Nov 13 '05 #1
3 1899
"Tim" <ti**********@u tvinternet.com> wrote in message
news:d7******** **@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...
Is it possible to select the number of copies of a report from a variable
input in a form ?

Tim Patton

You don't say whether you have done any vba coding or whther it would have
to be a non-code solution. Anyway here is a code idea: In the code below,
the report has two module-level variables one to keep track of the copies
printed so far and the other to show how many are required. It gets this
from a texbox on an open form (Forms!MyForm.t xtCopies) and is set when the
form opens. Then we keep on setting NextRecord to false until we have the
desired number of copies.
Option Compare Database
Option Explicit

Dim m_lngCopyCount As Long

Dim m_lngCopiesRequ ired As Long
'
'

Private Sub Detail_Print(Ca ncel As Integer, PrintCount As Integer)

On Error GoTo Err_Handler

If m_lngCopiesRequ ired > 0 Then
If m_lngCopyCount < m_lngCopiesRequ ired - 1 Then
NextRecord = False
m_lngCopyCount = m_lngCopyCount + 1
End If
Else
PrintSection = False
End If

Exit_Handler:
Exit Sub

Err_Handler:
MsgBox Err.Description , vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler

End Sub

Private Sub Report_Open(Can cel As Integer)

On Error GoTo Err_Handler

m_lngCopiesRequ ired = CLng(Nz(Forms!M yForm.txtCopies , 0))

Exit_Handler:
Exit Sub

Err_Handler:
Cancel = True
MsgBox Err.Description , vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler

End Sub
Nov 13 '05 #2
sure. One of the arguments for DoCmd.Print is number of copies. Just
point that part at your open form...

DoCmd.Print "MyReport",..., 3

Nov 13 '05 #3
<pi********@hot mail.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
sure. One of the arguments for DoCmd.Print is number of copies. Just
point that part at your open form...

DoCmd.Print "MyReport",..., 3

Which may be all the OP requires, but you will not be able to preview the
report as you can with my solution (if that is of any benefit)
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3858
by: gasturbtec | last post by:
i'm using access 2000 and have a form in which users can select reports with check boxes and click a print button to print out the selected reports. what i want to do now is place a text box on the form where the user can put the number of copies they want to print. i want to take that value and loop through my print code the number of time = to the text box value
122
5353
by: Einar | last post by:
Hi, I wonder if there is a nice bit twiddling hack to compare a large number of variables? If you first store them in an array, you can do: for (i = 0; i < n; i++) { if (array != value) { /* array differs from value, do something*/
0
1352
by: Alan | last post by:
Hi everyone Reading this group I learned how to print raw data by reading "HOW TO: Send Raw Data to a Printer by Using Visual C# .NET http://support.microsoft.com/?kbid=322091" Mylabel is printing fine except the printdialog box only prints out one copy...I am not sure where to put the printersettings.copies into microsofts example
1
1701
by: Venkatesha R | last post by:
Hi, I,m using printer dialog box,at runtime i need to know the number of printout copies user has entered. how do i get it in c#.net
0
1121
by: Robert | last post by:
I can access the PrintPreviewDialog to obtain the number of copies requested by the user by: int copies = dialog.Document.PrinterSettings.Copies; This does not tell me if the user actually printed the document. How can I tell if the user actually clicked on the print button to print the document versus just previewing it? Thanks,
9
1641
by: MLH | last post by:
I have a source query (qryITSLetterList) feeding rows containing name, addr, city, state, zip and VehicleID to a report (rptITSnotices). The query may contain 1-to-5 records resulting in 1-to-5 sheets of paper coming out of the printer. The report is a form letter. Each row in the source query results in a single page letter being printed. Suppose I could include a field in the query . The value in this field would be from 1-to-4. So if...
0
1099
by: Jayesh Fojdar | last post by:
hi i have installed vs.net 2002 with .net framework 1.0 sp3 the problem i am facing is as follows i have a report displayed in cr viewer and now when i print the report thru print dialog of cr viewer i get expontentional no. of copies of print out (i.e if i change copies to 2 i get 4 copies and when i change copies to 3 i get 9 copies ) . what can be the problem oplease help me out
19
4456
by: gk245 | last post by:
Trying to write a program that will figure out if a number is perfect or not. Here is my logic: 1) Read in the number 2) Split it up (number - 1) 3) Put all the split up numbers into an array 4) Figure out if the original number is evenly divisible by any of the numbers in the array.
2
3201
by: MLH | last post by:
Dim HowManyCopies As Integer HowManyCopies = 4 DoCmd.OpenReport "rptSeparatorSheet", acViewPreview DoCmd.PrintOut acPrintAll, acHigh, HowManyCopies, False DoCmd.Close acReport, "rptSeparatorSheet" Do I have the above syntax wrong. Am trying to get 4 copies of the report to print. Only 1 is ejecting.
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.