Print Multiple Copies Of A Report Using Macro

Jan 7, 2015

In Access 2007 is it possible to alter a macro so I can print 2 copies of a report. I have created a simple macro which opens up a report based on a value in a data entry form. I want to automatically print 2 copies of the report. Is this possible....

View Replies


ADVERTISEMENT

VBA Print 5 Copies Of Report Via Button On The Form

Nov 1, 2011

I am trying to print 5 copies of the report via the button on the form.

I'm sure I have the code correct, however I only prints 1 copy instead of 5.

View 1 Replies View Related

Print Report By Macro

Aug 16, 2007

Is there a way to print a report from a form by using VBA or a macro? If so how can this be done?

View 1 Replies View Related

Reports :: Query Based On Linked Tables - Report Produces Multiple Copies Of The Same Record

Jul 22, 2013

My report produces multiple copies of the same record. I know why, but don't know how to fix it.

EmployeeTable.

With a one to many relationship with TrainingTable (via employee PK as FK in trainingtable).

Training table has a one to many relationship with a table called Range.

Report is based on a query that picks up the Employee/Training/Range (range just describes the training unit).

However, If I have more than one range expressed organized a training unit, the report spits out several copies of the Employee record to display all the ranges.

View 2 Replies View Related

Modules & VBA :: How To Print Specific Report With PrintObject In Macro

Feb 13, 2015

Actually I need to select printer before printing report. That's why I need to call printer dialog to select printer using "PrintObject" in macro. But it's print the form not report. I need to print a specific report.

View 1 Replies View Related

Print 2 Copies

Oct 15, 2007

I have a form in Access with a command button that prints a receipt (which is actually created as a report). Anyway, I want 2 copies of this receipt to print when the print receipt button is clicked. Please take a look at my code and tell me what I would need to be able to accomplish this. Thanks.

rivate Sub PrintRec_Click()
On Error GoTo Err_PrintRec_Click

Dim rstTrans As New ADODB.Recordset
Dim fld As ADODB.Field
Dim strField As String
Dim curCount As Currency

rstTrans.Open "dbo_tbl_Transactions", CurrentProject.Connection, adOpenKeyset, adLockOptimistic

If IsNull(Me.TempTransNumID.value) Then
'this is new record
rstTrans.AddNew
Else
'to stay on the record that was just inserted for editing
rstTrans.Find ("TransNumID=" + Str$(Me.TempTransNumID))
End If

rstTrans!TransDate = Me.TransDate
rstTrans!CustomerName = Me.CustomerName
rstTrans!VehType = Me.VehType
rstTrans!TktType = Me.TktType
rstTrans!Auth_By = Me.AuthBy
rstTrans!Quantity = Me.Quantity
rstTrans!SHtkt1 = Me.SHtkt1
rstTrans!SHtkt2 = Me.SHtkt2
rstTrans!HRtkt1 = Me.HRtkt1
rstTrans!HRtkt2 = Me.HRtkt2
rstTrans!TransPayAmt = Me.TransPayAmt
rstTrans!PaymentType = Me.txtPaymentType
rstTrans!PaymentMethod = Me.cboPaymentMethod
rstTrans!CheckNum = Me.CheckNum
rstTrans!TransReceiptMemo = Me.TransReceiptMemo
rstTrans!TransEntryTime = Now()
rstTrans!TransEntryUserID = appUser

If Me.cboPaymentMethod = "Check" And IsNull(CheckNum) Then 'Check number not entered
MsgBox "You must enter a check no.", vbCritical, "Check Number Verification"
CheckNum.SetFocus
Exit Sub
End If

rstTrans.Update
'this was a new record so update the form value of TransNumID for edit
If IsNull(rstTrans!TransNumID.value) <> True Then
Me.TempTransNumID = rstTrans!TransNumID.value
End If

whereClause = "NewQryShuttleHandiRideReceipt.TransNumID" & " = " & rstTrans!TransNumID

//////here is where I'm printing the receipt
DoCmd.OpenReport "RptShuttle HandiRide Receipt", acViewNormal, , whereClause

rstTrans.Close

Set rstTrans = Nothing
Me.cmdAddRec.Enabled = True

Exit_PrintRec_Click:
MsgBox "Record Successfully Saved! Printing Receipt."
Exit Sub

Err_PrintRec_Click:
MsgBox Err.Description
Resume Exit_PrintRec_Click

End Sub

View 2 Replies View Related

Print 3 Copies Of Invoice With Different Remark

Jul 8, 2007

I want to print 3 copies of a report named Invoice with different remark i.e. Customer Copy, Office Copy, Auditor Copy. I want to print all 3 copies with a single print command.

Can any one help me.
Sample database is in attachmant.

View 7 Replies View Related

Reports :: Workorder - Print Three Copies With Each Copy Having Different Text In Footer

Jan 23, 2014

I have an old access database (written with 2003 but running under 2010) that creates workorders and I need to change a couple of the reports to print three copies with each copy having different text in the footer. I'm converting the reports from a old DOT Metrix special form printer to a laser printer. I have already modified the reports as far as the titleing and cosmetics are concerned and they print and look great on the laser printer. I have also added a TxT box that I want to contain the information on the report.

The reports are generated in a couple of different ways off different screens in the system off buttons, but I figured if I can get one of them to work I can replicate it to the others.

I have gone through the reports forum and have found a couple of solutions but can't get them to work. This is what I have found:

On the on button to print a range of workorders (it drives a query that asks for a starting workorder number and a ending workorder number) click from the from the switchboard:

DoCmd.OpenReport "rptBulkWorkOrdersbyWorkOrderNumberRange", , , , , "1"
DoCmd.OpenReport "rptBulkWorkOrdersbyWorkOrderNumberRange", , , , , "2"
DoCmd.OpenReport "rptBulkWorkOrdersbyWorkOrderNumberRange", , , , , "3"

Then I have this code but I'm not sure where it goes. On the report in the "on open" expression? not sure..

Select Case Me.OpenArgs
Case "1"
txtBox62 = "Shop Copy"
txtFld1 = [qryField1]

[Code] .....

View 14 Replies View Related

Reports :: Unbound Report - Print Preview OK But None Of Fields Print When Report Directly Send To Printer

May 25, 2013

I have an unbound form with an associated report. When the user hits the 'print' button on the form/screen, the report is launched in the background. In the On Load event of the report I populate the report fields from the forms field as so:

Code:
Me.txtAddrMainLine2 = "NAME " & UCase([Forms]![frm_OrderRx].[txtPatientName])

This works like a charm as long as I call the report in Print Preview mode (i.e. with acViewPreview). But if I send the report directly to the printer, none of the fields print.

I've read about using other report events to populate the fields (e.g., On Format and On Print) and also something about using TempVars to pass the data. But I haven't read anything that's clear and definitive about the full answer.

View 3 Replies View Related

Print Report From Form Based On Multiple Criteria?

Nov 17, 2006

Hi,

I have the following code which i found on another thread on this forum (thanks to original author) which is attached to the On Click of a button which prints the report corresponding to the details displayed in the form.

Dim strCriterion As String
Dim strMsg As String, strTitle As String
Dim intStyle As Integer

If IsNull(Me![ReferenceNumber]) Then

strMsg = "You cannot print a Blank Form!!."
strTitle = "Print Error"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle

Exit Sub
End If

If Me.Dirty Then
Me.Dirty = False
End If

strCriterion = "[ReferenceNumber]=" & Me![ReferenceNumber]
DoCmd.OpenReport "DoC Certificate", acViewNormal, , strCriterion

This works fine, however, i need to be able to select the report based on more than 1 criteria. For example, the Reference Number can be repeated but is distinguishable from each other by an Issue Number i.e. ReferenceNumber = 93, Issue 1 or 2 etc. At present when i run the above it prints all versions of, in this case, reference number 93, which given that each report is only a single page isn't a show-stopper but it would be nice to have it working as i would like.

I have tried adding to the strCriterion line such as strCriterion = "[ReferenceNumber]=" & Me![ReferenceNumber] and "[IssueNumber]=" & Me![IssueNumber] but no joy. I have tried bracketing the whole line and variations thereof, again no joy.

Can anybody tell if what i am attempting to do is possible and if so how do i go about it?

I have tried the above coding using MasterID which is the Autonumber PK but it produces an "Enter Parameter Value" box for MasterID. Obvioulsy if i can get it to work for the Autonumber then my problem goes away but i can't seem to figure out why it works for Reference Number (Number) and not MasterId (Autonumber)?

Regards

Alan

View 5 Replies View Related

Multiple Copies Of The Form

Jul 17, 2006

Hi,

I finished a db for a client to help her keep track of the classes she teaches, her students and other related info. The db has several tables and one main form with subforms. I read that it was a good rule of thumb to design the fewest posible forms to make the navigation centrilized and so I did. (I also spent some time on making it look less Access like, more of a stand alone app and wish to preserve it)
Up to this point the client was using Outlook to store all the contact info plus anything else she could jam into various "notes" fields. Now she wishes to have some simillar futures in the db to the ones outlook offered, one of them:
being able to open multiple contacts (records) in new windows. So basically she wants to open many instances of the main form so she can jump between the records without closing the previous one. My question is: what is the nicest (cleanest from the point of db design) way of giving her such functionality? I thought about giving her an option to open the new record (student) in a tab, but I'm not sure how to acomplish that. Another way would be to copy the main form several times and open those as she clicks on "open in new window", but I don't think it's a good solution, becsue: e.g. How many copies do I create? I'd have to go over all the vba in each copy and adjust it so it works properly with the copy, plus all the vba in each subform... :eek:
Any thoughts would be greatly appreciated on how to tackle this. Also what are the consequences of having several instances of the same form open (editing same record by mistake, etc..)

Thank you very much,
Mariusz

View 4 Replies View Related

Forms :: Print Report Based On Subform With Multiple Search Criteria

Jun 14, 2015

I have a problem printing a Subform that uses multiple criteria(in textboxes) as filters.

The search portion of the form works fine. The problem is I have created a report based on the subform and am using the following code to open/filter the report

Code:
Private Sub PrintBtn_Click()
Dim strCriterion As String
Dim strMsg As String, strTitle As String

[Code].....

View 3 Replies View Related

Syncronising Multiple Copies Of An Access Database

Mar 15, 2007

If I want to distribute copies of a database and have one copy as the master and syncronise data; can i use briefcase or is there a better way?:o

View 1 Replies View Related

General :: Printing Multiple Copies Of A Form?

Jun 18, 2015

I have an Access based CRM system that was built for me in 1998. Amazingly it is still pretty effective. However, I would like to make a small adjustment in the programming..

Once we've added the details for an order we press continue and the screen closes and one copy of the acknowledgement of order form. I simply want it to print three copies!

I believe this is the coding part of the command that is effected.

Rem Print Report
DoCmd.OpenReport "Order Acknowledgement"
Rem Close Form
DoCmd.Close acForm, "Booking Entry"

View 2 Replies View Related

Reports :: Printing Multiple Copies Of Each Group

Sep 24, 2013

Our access database keep track of children attending an after-school music programme.

Each week we print registers and give them to the class teachers for them to mark who is coming. The registers are produced as a report, grouped by School then by Class.

We run 3 times a week so each week I need to print off 3 copies of the registers for each class.

Is there a way to print multiple copies of each group in a report? This would save me quite a bit of time each week.

I'm using Access 2013...

View 5 Replies View Related

Print Macro

Jul 19, 2006

I made a print macro to print records from a subform.



The problem is, it prints all the records in the subform that are not visible aswell. I did a search for records with TSA in it and it shows 3 records. These are the only records I want to print.

The code I use at the moment looks like this:

Code:Private Sub Print_Click()On Error GoTo Err_Print_Click Dim stDocName As String Dim MyForm As Form stDocName = "frmSubform" Set MyForm = Screen.ActiveForm DoCmd.SelectObject acForm, stDocName, True DoCmd.PrintOut DoCmd.SelectObject acForm, MyForm.Name, FalseExit_Print_Click: Exit SubErr_Print_Click: MsgBox Err.Description Resume Exit_Print_Click End Sub

View 6 Replies View Related

Queries :: Cartesian Table - Create Multiple Copies Of A Record To Use For Printing Labels

Aug 5, 2013

I am using a cartesian query to create multiple copies of a record to use for printing labels.

Here's my query that produces the cartesian result:

SELECT tblCount.CountID, tblDeliveryOrders.DeliveryOrderNum, CurrentCY.Deliveryorderlineitemnum, CurrentCY.Quant, CurrentCY.UOM1, tblContainerSizeCodes.SizeCode, tblContainerTypeCodes.TypeCode, CurrentCY.WasteDescription, tblEtidDodaac.EtidDodaac, CurrentCY.ETIDDocNum, CurrentCY.Pounds, tblEPAWasteCodes.[EPAWasteCodes(1B)]

[Code] ....

This works just fine in creating the desired result - EXCEPT I don't get all the records.

When I remove the 'cartesian table', and right join everything, then I get the correct results. If I keep everything as-is and reintroduce the cartesian table, then I get an error about there being an ambiguous outer join.

View 3 Replies View Related

Can I Disable Print Macro Def When Using Printout

Sep 15, 2005

here's my macro



after each print out line i get this



can i disable this prompt from appearing?

View 1 Replies View Related

Modules & VBA :: Print Linked Doc From Macro

Jun 17, 2015

I'm working in 2003 (still) and have a macro to print the selected form the user has on their screen. I need this same macro to also print a PDF in a particular network folder or just exit if the PDF doesn't exist. I've tried RunSQL with "PrintDoc [Link2PDF]" as the argument. I've tried RunApp with "Acro Rd32.exe /t [Link2PDF]" as the argument but neither one works. The RunApp line will open the Adobe reader but nothing more.

View 4 Replies View Related

Tables :: Print Labels Macro - VBA

Jan 28, 2014

I have an Access database that includes a customer listing. My client would like me to include a button on a form that prints off all of their customers' names and addresses onto mailing labels. I know how to do it manually by clicking on the Customers table, clicking Labels under the Create ribbon, selecting the fields, selecting the label manufacturer, size, etc. etc., but the customer would prefer to have just one single button.

I've looked everywhere for VBA code to put into a macro that does this. Unfortunately, unlike Excel, Access doesn't have a "Record Macro" option so I can attach it to the button.

Table: Customers
Fields: FirstName LastName Address City State Zip (There are other fields, but they are not relevant to printing address labels)

View 1 Replies View Related

Queries :: Report Or Macro To Run Multiple Queries Using Same Parameters?

Aug 9, 2013

So I run cash flow for a business, and we export data from Oracle and insert it into an access database. I have to run about 25 queries, entering in the same parameters for each. We number each week of the year. So for say the first week in January, I would run the first query and it asks: Beginning Week, I enter in 1, then another paramter value asks me the ending week. I have to enter in these parameters for each of the 25 or so queries, and it becomes quite irritating. Each query has a number of columns, but I am only interested in obtaining the sum of one of the columns, titled Distribution amount. So I am looking for something that will run each of my specified queries, then spit out the total of the distribution column for each in a table like.

Query 1: Total Distribution
Query 2: Total Distribution
etc....

Is there anything that would allow me to do this, with entering in the week parameter once, say week 1 start, week 1 end. and it use those same parameters for each query?

View 1 Replies View Related

Print Out Macro Action - Prompt To Save As

Sep 21, 2011

Why when I set up a macro with a PrintOut action does it always prompt me to "Save As" before it prints? I have a default printer set up in the system, but it still asks to "Save As." It does print after.

View 1 Replies View Related

I Want To Print A Report And Programmatically Set The Printer Name And 'Print To File

Jul 16, 2007

How can I print a report and at the same time programatically set the printer name and 'Print to File' option and set the path of this option?

View 1 Replies View Related

Reports :: Print Only Report Matching Current Record In Form Among Multiple Reports

Oct 2, 2013

I have been an MS Excel man all along my career and I am a novice in MS Access.I have created a table, [Initial Customer Approval] which records data from a Form, [Initial Customer Approval]. Once the data is entered in the Form, I need to do some calculations based on the data entered in some of the fields in the form.I created 6 different queries for the six possible values in those fields. now for each of those queries I created respective reports.I placed a Print command button in the Form.

1. When I press the Print button it should open the report for the current record in the Form. (Currently It Opens all the reports simulatneously, with only one relevant report containing the current record; other opened reports being blank.)

2. If user presses the Print button before pressing Save button then system should prompt user.

Here is the code (Please note [reference number] is the unique ID generated for each record entered in the tabe through form):

Private bSaveClicked As Boolean
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not bSaveClicked Then
MsgBox "You are trying to navigate away from the active record. Please either save your changes, or press ESC to cancel your changes.", vbOKOnly + vbInformation
Cancel = True

[code]...

View 5 Replies View Related

Macro - Print To Adobe PDF File And Save As Database Name

Dec 16, 2004

Using Access 2000, I have a macro to generate a report by updating various make-table queiries. I would like for the macro to print the report to an Adobe PDF file and save the file as the database name.

When I manually print the report, it gives me the opition of selecting printers and Adobe PDF is listed as a printer. After selecting the "printer", a "Save As PDF" menu pops up and currently it lists the Access Report Name. I would like to use the database name as the name of the PDF file.

In short, when I execute the "Generate Report" macro, I want the end product to be a PDF file using the database name as the PDF file name.

View 6 Replies View Related

Reports :: Publishing Multiple Copies Of Selected Reports

Nov 18, 2013

I am trying to add to a db I inherited. One of the end reports that is produced is a cost breakdown for each end user.As things stand, the data collates into individual reports which are then grouped into one file and saved via PDF. What I am trying to work out is whether or not I can selectively pick some of those reports to have more than one copy.

I see a form (within an existing form) that will list all of the end users for a particular scheme and, next to that, be a dropdown that will allow the db user to select how many copies of each report needs to be published. These will then collate merrily into one document to be saved to PDF.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved