A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

duplicate page



 
 
Thread Tools Display Modes
  #1  
Old June 21st, 2009, 09:53 AM posted to microsoft.public.access.tablesdbdesign
cjgav
external usenet poster
 
Posts: 54
Default duplicate page

Hi
I've created a report, when I print it I would like to print 3 copies 1 with
the header back ground in plan 1 in yellow 1 in green .
What is the best way to do this?

Regards

  #2  
Old June 21st, 2009, 11:55 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default duplicate page

1. Create a table with 2 fields like this:
CopyID Number primary key
CopyColor Number
Enter 3 records, with the copy number and color:
1 16777215
2 65535
3 65280

2. Create a query for your report (if you don't already have one.) As well
as any other tables you need, add the table you just created. The new table
should not have any line joining it to other tables in the upper pane of
table design. This gives you 3 of every record. Make sure the query shows
the 2 fields from the new table.

3. Open your report in design view.
Change its RecordSource property to the new query.
Open the Sorting And Grouping dialog.
Insert a new field above any others in Sorting'n'Grouping, based on the
CopyID field, and set a Group Header for this field. Access will show a new
CopyID Group Header on your report.

4. In the new group header, add a text box for CopyColor.

5. Select the CopyID Group Header, and choose Properties.
Set the On Format property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the code window.
Between the "Private Sub..." and "End Sub" lines, insert 3 lines so it looks
like this:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me.CopyColor) Then
Me.Section("GroupHeader0").BackColor = Me.CopyColor
End If
End Sub

Make sure the "GroupHeader0" name in quotes matches the name Access gave you
for the GroupHeader0 on the "Private Sub ..." line.

How it works:
==========
The colors you stored in the table are RGB values. If you want different
numbers, open the Immediate Window (Ctrl+G), and enter:
? RGB(255, 255, 255)
The 3 numbers in brackets are values for Red, Green, and Blue respectively.
Each number must be between 0 (none) and 255 (max.)

The query without a join is called a Cartesian product. It gives you every
possible combination, so in this case 3 of every record. You can add more
records to the table if you need more than triplicate.

Since the query gives 3 copies of every record, so does the report. You may
need to move some text boxes into the new CopyID Group Header section rather
than the Report Header, so they show on each copy. You can set the Visible
property of the CopyColor text box to No to suppress it. If you have other
text boxes in this header, set their Back Style property to transparent.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cjgav" wrote in message
...
Hi
I've created a report, when I print it I would like to print 3 copies 1
with
the header back ground in plan 1 in yellow 1 in green .
What is the best way to do this?

Regards


  #3  
Old June 21st, 2009, 11:38 PM posted to microsoft.public.access.tablesdbdesign
cjgav
external usenet poster
 
Posts: 54
Default duplicate page

Hi Allen
Thanks for that.
I do not seem to be able to modify my query as you advised,I get an
ambiguous joins error. Any idea what I'm doing wrong.

regards





"Allen Browne" wrote:

1. Create a table with 2 fields like this:
CopyID Number primary key
CopyColor Number
Enter 3 records, with the copy number and color:
1 16777215
2 65535
3 65280

2. Create a query for your report (if you don't already have one.) As well
as any other tables you need, add the table you just created. The new table
should not have any line joining it to other tables in the upper pane of
table design. This gives you 3 of every record. Make sure the query shows
the 2 fields from the new table.

3. Open your report in design view.
Change its RecordSource property to the new query.
Open the Sorting And Grouping dialog.
Insert a new field above any others in Sorting'n'Grouping, based on the
CopyID field, and set a Group Header for this field. Access will show a new
CopyID Group Header on your report.

4. In the new group header, add a text box for CopyColor.

5. Select the CopyID Group Header, and choose Properties.
Set the On Format property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the code window.
Between the "Private Sub..." and "End Sub" lines, insert 3 lines so it looks
like this:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me.CopyColor) Then
Me.Section("GroupHeader0").BackColor = Me.CopyColor
End If
End Sub

Make sure the "GroupHeader0" name in quotes matches the name Access gave you
for the GroupHeader0 on the "Private Sub ..." line.

How it works:
==========
The colors you stored in the table are RGB values. If you want different
numbers, open the Immediate Window (Ctrl+G), and enter:
? RGB(255, 255, 255)
The 3 numbers in brackets are values for Red, Green, and Blue respectively.
Each number must be between 0 (none) and 255 (max.)

The query without a join is called a Cartesian product. It gives you every
possible combination, so in this case 3 of every record. You can add more
records to the table if you need more than triplicate.

Since the query gives 3 copies of every record, so does the report. You may
need to move some text boxes into the new CopyID Group Header section rather
than the Report Header, so they show on each copy. You can set the Visible
property of the CopyColor text box to No to suppress it. If you have other
text boxes in this header, set their Back Style property to transparent.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cjgav" wrote in message
...
Hi
I've created a report, when I print it I would like to print 3 copies 1
with
the header back ground in plan 1 in yellow 1 in green .
What is the best way to do this?

Regards



  #4  
Old June 22nd, 2009, 01:20 AM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default duplicate page

cjgav,

Sounds like you are trying to create a join between the table Allen
suggested and the other tables in the query. As Allen said, no joins, just
drop the copy table in the query. However, be sure the query runs prior to
dropping the copy table in. If it does not run without the copy table, fix
that and then drop in the copy table.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"cjgav" wrote in message
...
Hi Allen
Thanks for that.
I do not seem to be able to modify my query as you advised,I get an
ambiguous joins error. Any idea what I'm doing wrong.

regards





"Allen Browne" wrote:

1. Create a table with 2 fields like this:
CopyID Number primary key
CopyColor Number
Enter 3 records, with the copy number and color:
1 16777215
2 65535
3 65280

2. Create a query for your report (if you don't already have one.) As
well
as any other tables you need, add the table you just created. The new
table
should not have any line joining it to other tables in the upper pane of
table design. This gives you 3 of every record. Make sure the query shows
the 2 fields from the new table.

3. Open your report in design view.
Change its RecordSource property to the new query.
Open the Sorting And Grouping dialog.
Insert a new field above any others in Sorting'n'Grouping, based on the
CopyID field, and set a Group Header for this field. Access will show a
new
CopyID Group Header on your report.

4. In the new group header, add a text box for CopyColor.

5. Select the CopyID Group Header, and choose Properties.
Set the On Format property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the code window.
Between the "Private Sub..." and "End Sub" lines, insert 3 lines so it
looks
like this:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As
Integer)
If Not IsNull(Me.CopyColor) Then
Me.Section("GroupHeader0").BackColor = Me.CopyColor
End If
End Sub

Make sure the "GroupHeader0" name in quotes matches the name Access gave
you
for the GroupHeader0 on the "Private Sub ..." line.

How it works:
==========
The colors you stored in the table are RGB values. If you want different
numbers, open the Immediate Window (Ctrl+G), and enter:
? RGB(255, 255, 255)
The 3 numbers in brackets are values for Red, Green, and Blue
respectively.
Each number must be between 0 (none) and 255 (max.)

The query without a join is called a Cartesian product. It gives you
every
possible combination, so in this case 3 of every record. You can add more
records to the table if you need more than triplicate.

Since the query gives 3 copies of every record, so does the report. You
may
need to move some text boxes into the new CopyID Group Header section
rather
than the Report Header, so they show on each copy. You can set the
Visible
property of the CopyColor text box to No to suppress it. If you have
other
text boxes in this header, set their Back Style property to transparent.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cjgav" wrote in message
...
Hi
I've created a report, when I print it I would like to print 3 copies 1
with
the header back ground in plan 1 in yellow 1 in green .
What is the best way to do this?

Regards





  #5  
Old June 22nd, 2009, 06:05 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default duplicate page

If you already have a query with outer joins, then perhaps you could create
a new query, using your exising query and the new table as source 'tables'
for the new query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"cjgav" wrote in message
...
Hi Allen
Thanks for that.
I do not seem to be able to modify my query as you advised,I get an
ambiguous joins error. Any idea what I'm doing wrong.

regards





"Allen Browne" wrote:

1. Create a table with 2 fields like this:
CopyID Number primary key
CopyColor Number
Enter 3 records, with the copy number and color:
1 16777215
2 65535
3 65280

2. Create a query for your report (if you don't already have one.) As
well
as any other tables you need, add the table you just created. The new
table
should not have any line joining it to other tables in the upper pane of
table design. This gives you 3 of every record. Make sure the query shows
the 2 fields from the new table.

3. Open your report in design view.
Change its RecordSource property to the new query.
Open the Sorting And Grouping dialog.
Insert a new field above any others in Sorting'n'Grouping, based on the
CopyID field, and set a Group Header for this field. Access will show a
new
CopyID Group Header on your report.

4. In the new group header, add a text box for CopyColor.

5. Select the CopyID Group Header, and choose Properties.
Set the On Format property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the code window.
Between the "Private Sub..." and "End Sub" lines, insert 3 lines so it
looks
like this:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As
Integer)
If Not IsNull(Me.CopyColor) Then
Me.Section("GroupHeader0").BackColor = Me.CopyColor
End If
End Sub

Make sure the "GroupHeader0" name in quotes matches the name Access gave
you
for the GroupHeader0 on the "Private Sub ..." line.

How it works:
==========
The colors you stored in the table are RGB values. If you want different
numbers, open the Immediate Window (Ctrl+G), and enter:
? RGB(255, 255, 255)
The 3 numbers in brackets are values for Red, Green, and Blue
respectively.
Each number must be between 0 (none) and 255 (max.)

The query without a join is called a Cartesian product. It gives you
every
possible combination, so in this case 3 of every record. You can add more
records to the table if you need more than triplicate.

Since the query gives 3 copies of every record, so does the report. You
may
need to move some text boxes into the new CopyID Group Header section
rather
than the Report Header, so they show on each copy. You can set the
Visible
property of the CopyColor text box to No to suppress it. If you have
other
text boxes in this header, set their Back Style property to transparent.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cjgav" wrote in message
...
Hi
I've created a report, when I print it I would like to print 3 copies 1
with
the header back ground in plan 1 in yellow 1 in green .
What is the best way to do this?

Regards




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.