Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple mail labels per record

0 views
Skip to first unread message

Piers Chivers

unread,
Jan 17, 2004, 4:08:54 PM1/17/04
to
Hi,
I have a table that records a customer's journeys where a journey is made up
of

Start Place
Start Pickup Time
Return Place
Number of Tickets.

I would like to print out a label that contains "Start Place, Pickup Time,
Return Place" BUT I need to print out "Number Of Tickets" number for each
record. That is, if I have a record

"London"
"10:00 am"
"Paris"
"5"

I would like 5 identical labels to be printed as "London, 10:00am, Paris".

I'm not very experienced with SQL but is there some clever query I can write
to feed into the Label Wizard to get this? If not, how do I go about this?

Many thanks,
Piers


M.L. Sco Scofield

unread,
Jan 18, 2004, 12:46:51 AM1/18/04
to
Take a look at the article at http://support.microsoft.com/default.aspx?scid=kb;en-us;231801&Product=acc2000.

Not only does it talk about printing duplicate labels, it also talks about printing on partial sheets.

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #16 of 19: 2 monograms = 1 diagram
Miscellaneous Access and VB "stuff" at www.ScoBiz.com

"Piers Chivers" <pchi...@nospam.protek.com> wrote in message news:u$MsM2T3D...@TK2MSFTNGP11.phx.gbl...

Mike Painter

unread,
Jan 18, 2004, 2:42:42 AM1/18/04
to

"Piers Chivers" <pchi...@nospam.protek.com> wrote in message
news:u$MsM2T3D...@TK2MSFTNGP11.phx.gbl...
If it's always five there is a simple SQL way to do this.
Create a table with one field and five records 1, 2, 3, 4, 5 for values (not
really important)
Create a query with your journey table and the number table.
Do not join them and you will get a Cartesian set with five records per
journey record.

There are several routines for doing what you want with code and The Access
Developers handbook has one, along with the code on the CD.
It's worth having and almost anyone of the routines in the book is worth the
price.
www.bookpool.com for the best price.

How come programmers who work by the hour spend money to buy books that let
them spend less time on a project?


John Vinson

unread,
Jan 18, 2004, 3:57:27 PM1/18/04
to
On Sun, 18 Jan 2004 07:42:42 GMT, "Mike Painter" <mdotp...@att.net>
wrote:

>If it's always five there is a simple SQL way to do this.
>Create a table with one field and five records 1, 2, 3, 4, 5 for values (not
>really important)
>Create a query with your journey table and the number table.
>Do not join them and you will get a Cartesian set with five records per
>journey record.

For any number of tickets, you can do the same thing with another
twist: use a table (I call mine Num) with a field, N, with integer
values 1 through 10000. Put a criterion on N of

<= [Number of Labels]

and that's how many you'll get for each record.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public

Piers Chivers

unread,
Jan 20, 2004, 6:33:10 PM1/20/04
to
Sco,
Many thanks. This is almost what I need! However, the sample gets the
number to print by prompting the user. I already have this number in my
table but I'm at a loss of how to communicate my value to the VB code
(LabelSetup in the example).

My general question is : how do I pass a value from a table into a general
module when referring to the function from an event procedure? I've tried
LabelSetup([Journeys]![Number of Tickets]) but no luck :(

I also tried creating a hidden text box on the label containing the Number
Of Tickets and then referring to the control by Me![Number of Tickets] but
this didn't work either (and seemed too clumsy).

Any ideas?

Thanks,
Piers


"M.L. Sco Scofield" <S...@ScoBiz.com> wrote in message
news:OnOQ#aY3DH...@tk2msftngp13.phx.gbl...

John Vinson

unread,
Jan 20, 2004, 8:07:44 PM1/20/04
to
On Tue, 20 Jan 2004 23:33:10 -0000, "Piers Chivers"
<piers....@nospam.boldonjames.com> wrote:

>Sco,
>Many thanks. This is almost what I need! However, the sample gets the
>number to print by prompting the user. I already have this number in my
>table but I'm at a loss of how to communicate my value to the VB code
>(LabelSetup in the example).
>
>My general question is : how do I pass a value from a table into a general
>module when referring to the function from an event procedure? I've tried
>LabelSetup([Journeys]![Number of Tickets]) but no luck :(
>
>I also tried creating a hidden text box on the label containing the Number
>Of Tickets and then referring to the control by Me![Number of Tickets] but
>this didn't work either (and seemed too clumsy).

For any number of tickets, you can do the same thing with another


twist: use a table (I call mine Num) with a field, N, with integer

values 1 through 10000. Include Num in the Query upon which the label
report is based, with NO join line - this gives you a "Cartesian
join", normally a bad idea but handy here. Put a criterion on N of

0 new messages