I want to have different footers in different copies of the same page. Like while printing an invoice, I want CUSTOMER COPY on one copy, SELLER COPY on the second copy, OFFICE COPY on the third copy of the invoice.
How do I do it?
Will someone help..
Regards,
Bijon
8 2944
I want to have different footers in different copies of the same page. Like while printing an invoice, I want CUSTOMER COPY on one copy, SELLER COPY on the second copy, OFFICE COPY on the third copy of the invoice.
How do I do it?
Will someone help..
Regards,
Bijon
Make 3 copies of the report and use them as sub reports in a larger report.
Make 3 copies of the report and use them as sub reports in a larger report.
Another alternative:
Create the multiple prints in code with a For/Next Loop. Use an unbound textbox named txtReportTitle with its “can grow” property set to yes to change Title for each copy. Replace "YourFormReport" with the actual name of your report. -
Private Sub btnInvoicePrint_Click()
-
-
Dim x as Integer ‘loop counter
-
-
For x = 1 to 3
-
If x = 1 then
-
txtReportTitle.Value = “Customer Copy”
-
ElseIf x = 2 then
-
txtReportTitle.Value = “Seller Copy”
-
ElseIf x = 3 Then
-
txtReportTitle.Value = “Office Copy”
-
Else
-
Exit Sub
-
End If
-
DoCmd.OpenReport “yourFormReport”, acViewNormal
-
Next x
-
-
End Sub
Tried this out.
Everytime it is giving an error--- Object required.
On debugging, it points to the line : txtReportTitle.Value = “Customer Copy”
Please help
regards
bijon
Another alternative:
Create the multiple prints in code with a For/Next Loop. Use an unbound textbox named txtReportTitle with its “can grow” property set to yes to change Title for each copy. Replace "YourFormReport" with the actual name of your report. -
Private Sub btnInvoicePrint_Click()
-
-
Dim x as Integer ‘loop counter
-
-
For x = 1 to 3
-
If x = 1 then
-
txtReportTitle.Value = “Customer Copy”
-
ElseIf x = 2 then
-
txtReportTitle.Value = “Seller Copy”
-
ElseIf x = 3 Then
-
txtReportTitle.Value = “Office Copy”
-
Else
-
Exit Sub
-
End If
-
DoCmd.OpenReport “yourFormReport”, acViewNormal
-
Next x
-
-
End Sub
Tried this out.
Everytime it is giving an error--- Object required.
On debugging, it points to the line : txtReportTitle.Value = “Customer Copy”
Please help
regards
bijon
Did you go into design view and add an unbound textbox, and set its name property to txtReportTitle?
If you did the above and it is not working, let me know.
Added an unbound textbox in the Report footer section with that name.Set the CanGrow property to yes and tried it out.
Doesn't work.
Please help.
bijon
Did you go into design view and add an unbound textbox, and set its name property to txtReportTitle?
If you did the above and it is not working, let me know.
Added an unbound textbox in the Report footer section with that name.Set the CanGrow property to yes and tried it out.
Doesn't work.
Please help.
bijon
I think the problem is that the title needs to inserted in the Report's open event, and therefore two event procedures are required...one for the button click to print the report and a separate sub for the insertion of the txtTitle during the report's open event. See the code for the two procedures below. -
Private Sub btnInvoicePrint_Click()
-
Dim x as Integer ‘loop counter
-
-
For x = 1 to 3
-
DoCmd.OpenReport “yourFormReport”, acViewNormal
-
Next x
-
End Sub
________________________________________ -
Private Sub Report_Open(Cancel As Integer)
-
Dim x as Integer ‘loop counter
-
-
For x = 1 to 3
-
If x = 1 then
-
txtReportTitle.Value = “Customer Copy”
-
ElseIf x = 2 then
-
txtReportTitle.Value = “Seller Copy”
-
ElseIf x = 3 Then
-
txtReportTitle.Value = “Office Copy”
-
Else
-
Exit Sub
-
End If
-
Next x
-
-
End Sub
It doesn't work still.
I tried another way. I deleted the second code from the report On Open event and pasted it on the Page footer "On print" event.
This time, however, it is asking for the invoice no on three different occassions but every time the footer comes out as Office Copy and not as desired.
Please try it out
Regards
bijon
It doesn't work still.
I tried another way. I deleted the second code from the report On Open event and pasted it on the Page footer "On print" event.
This time, however, it is asking for the invoice no on three different occassions but every time the footer comes out as Office Copy and not as desired.
Please try it out
Regards
bijon
Ok. I tested the following code and it works on Access 2000: -
Private Sub btnInvoicePrint_Click()
-
Dim x As Integer 'loop counter
-
-
For x = 1 To 3
-
Me.Painting = False
-
DoCmd.OpenReport "YourInvoiceReport", acViewPreview
-
If x = 1 Then
-
Reports!YourInvoiceReport!txtReportTitle.Value = "Customer Copy"
-
ElseIf x = 2 Then
-
Reports!YourInvoiceReport!txtReportTitle.Value = "Seller Copy"
-
ElseIf x = 3 Then
-
Reports!YourInvoiceReport!txtReportTitle.Value = "Office Copy"
-
Else
-
Exit Sub
-
End If
-
DoCmd.OpenReport "YourInvoiceReport", acViewNormal
-
DoEvents
-
Me.Painting = True
-
Next x
-
-
End Sub
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Rupe |
last post by:
Hi CSS gurus!
I have an embarassing problem.
I am a php programmer and I try to expound the advantages of css on the php
newsgroups.
However, after telling someone that they should use css...
|
by: reneecccwest |
last post by:
hello,
how can I remove IE headers and footers when I print a page?
I'd like to use a code to remove them, not thru the IE page setup.
s/RC
|
by: Kenneth |
last post by:
Hi,
In IE6 you can configure output to the printer getting a clean printout only with content, but without headers and footers. You remove the Header and Footer content from the Page Setup. But...
|
by: Robert Adkison |
last post by:
I need to print a web page. It is my preference that my users just do a
File/Print from explorer. That way my users will get the print dialog that
will allow them to select the fax printer. The...
|
by: Jim |
last post by:
This should be easy, but I have not found much that makes sense. My
application creates a document, of indeterminate length, and prints the
document. I am printing from a saved document in RTF...
|
by: kaosyeti |
last post by:
hey... i have a quarterly report that i'm working on where each of the 12 or
so pages is completely different from the other. all are based on basically
the same info (ergo, the same query) but...
|
by: TS |
last post by:
I have 2 sql server databases on 2 different servers, a web app, and a
crystal reports interface. When the app uses 1 database and the reports
datasource points to a different database, both...
|
by: deepaks85 |
last post by:
I need to create a CMS in which we will create user and each user should connected with the different airlines databases and that user will be able to upload files and view files in PDF and print...
|
by: ppuniversal |
last post by:
Hi,
I am developing an application in ASP .NET where I have to generate a Header and a Footer on my web pages. The issue is that, these headers and footers need to be dynamically placed on the page....
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |