number of rows depending on the value

TheBud

New member
Local time
Today, 21:20
Joined
Dec 6, 2005
Messages
4
Hi Everyone
I have been searching EVERYWHERE, but was unable to locate even the correct wording of my problem, so I decided to see if there is anyone here solve this riddle for me:

I have a simple table with 2 fields
ie :
NAME NUMBER
George 5
John 3
etc...
I have the need to make a report that makes stickers and make 5 stickers with the name George on it and 3 with the name John etc...
I cant even think of a query that would produce 5 rows of George followed by 3 Johns (;})..
The actual problem is more complex than this ( many times ) but this is what is holding me back atm.

Thanks in advance people, and I would like to say that I have learned VERY VERY MUCH from this site alone , and within a month from starting to learn Access for the first time, I have succesfully made a database that is working just fine for invoices and keeping track of inventory....
 
Create a table with one column defined as Integer. Make this column the key. Add as many rows as the maximum number of labels you will need.

1,2,3,4,5,......250, whatever

When you need to produce labels, create a query that joins to this table on the count field. Switch the query to SQL view. Change the join from

Where CountField = SeqNum to:

Where CountField >= SeqNum

This is a non-equi join and cannot be represented in QBE view so you will NEVER be able to go back to QBE view with this query.
 
NOW THIS is EXACTLY what I had in mind!! THanks a lot!! It is so "easy", yet I would have spent a month looking for that simple solution!
Many thanks again... Stickers are already finished and ready to print on demand.
 

Users who are viewing this thread

Back
Top Bottom