Labels - Multiple copies of same info

G

Guest

I need to print out a sheet of lables with the same information (from a
query) on one page. Ive tried the access wizard and it prints out labels
with different infomation on each label.

Help !
 
A

Arvin Meyer

Philip said:
I need to print out a sheet of lables with the same information (from a
query) on one page. Ive tried the access wizard and it prints out labels
with different infomation on each label.

Help !

If there are a lot of them it would make sense to write some code. But for a
one time usage where you may only need a page (printed as many times as you
like) it may be simpler to put the information in a single row of an Excel
spreadsheet, then drag it down for as many rows as there are labels on a
page. Link the Excel spreadsheet to Access as you would any table (File ...
Get External Data ... Link) and change the type to Excel. Then use the label
wizard naming the Excel table as the recordsource.

If you already have your data in Access, simply select the row and choose
Tools ... Office Links ... Analyze with Excel to export the row of data to
an Excel spreadsheet.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

Thanks Arvin.

It wouldnt be a one-off thing. We would be printing on a regular basis with
different names.
 
A

Arvin Meyer

Then you can build a table with the number of rows that there are lables and
use it as a Cartesian product in a query. To explain: A Cartesian product is
the result of 2 unjoined tables in SQL. If I have a table with 10 records,
and another with 30 records and I add them both to the same query without
creating a join, I get a result of 300 records. So what you can do is to
create a query that returns a single row, then use that query and your table
of, say 30 records to create a query that returns 30 records of the 1 row of
data.

Alternatively, you can use code that was developed by Ken Getz in his book
the Access Developer's Handbook.

http://www.amazon.com/exec/obidos/ASIN/0782140092/ref=ase_mcwtechnologies
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
F

fredg

I need to print out a sheet of lables with the same information (from a
query) on one page. Ive tried the access wizard and it prints out labels
with different infomation on each label.

Help !

This will permit you to enter the number of times to repeat the
labels, as well as skip missing label positions on an already used
sheet.

First make sure your label report properly prints 1 label per record.

Then add a Report Header to the label report.
Add 3 unbound text boxes to the header.
1) Set the Control Source to:
= [Skip how many]
Name this control SkipCounter
2) Leave the second control unbound.
Name this control SkipControl
3) Set the third control's Control Source to:
=[Repeat how many]
Name it RepeatCounter

Next code the Report Header OnFormat event:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
[SkipControl] = "Skip"
Cancel = True
End Sub
=======
Now code the Detail OnPrint Event:
(Note that intMyPrint is Static!!)

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Static intMyPrint As Integer
If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then
Me.NextRecord = False
Me.PrintSection = False
intMyPrint = 0
Else
[SkipControl] = "No"
Me.PrintSection = True
Me.NextRecord = True
intMyPrint = intMyPrint + 1
If IsNull([RepeatCounter]) Then
ElseIf intMyPrint Mod [RepeatCounter] = 0 Then
Me.NextRecord = True
intMyPrint = 0
Else
Me.NextRecord = False
End If
End If

End Sub
=========

When you run the report, it will ask how many labels to skip, then how
many times to repeat each label.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top