making a "for..next" loop to export to excel (1 Viewer)

Mike1sMike

New member
Local time
Today, 02:25
Joined
Apr 24, 2020
Messages
16
Hello,

On a form with [name], [color], [poundage] and [rolls]

My need/want is to export to a new excel spreadsheet based on [name]:
a heading row with: name color poundage rolls
and then the SAME name, color and poundage for the number of rolls there are
so if

Name is Mike, Color is Silver, Poundage is 2000 and Rolls is 12 i would get

Name Color Poundage Rolls
Mike Silver 2000 1
Mike Silver 2000 2
Mike Silver 2000 3
Mike Silver 2000 4
Mike Silver 2000 5
Mike Silver 2000 6
Mike Silver 2000 7
Mike Silver 2000 8
Mike Silver 2000 9
Mike Silver 2000 10
Mike Silver 2000 11
Mike Silver 2000 12

created in an excel file

Am I being dumb?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:25
Joined
Oct 29, 2018
Messages
21,467
Hi. You should be able to create a query in Access with the same result and then export it to Excel. You can do that by using a Tally table. It's a table with nothing but a series of sequential numbers in it. Then, you would use a Cartesian Query to generate the result you want. Take a look at this blog article, as a starter.
 

Mike1sMike

New member
Local time
Today, 02:25
Joined
Apr 24, 2020
Messages
16
Hi. You should be able to create a query in Access with the same result and then export it to Excel. You can do that by using a Tally table. It's a table with nothing but a series of sequential numbers in it. Then, you would use a Cartesian Query to generate the result you want. Take a look at this blog article, as a starter.
Thank you, again. Funny because the example they are showing is example what i am using it for. Appreciate it!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:25
Joined
Oct 29, 2018
Messages
21,467
Thank you, again. Funny because the example they are showing is example what i am using it for. Appreciate it!
Hi. You're welcome. Let us know if you need more help. Cheers!
 

Users who are viewing this thread

Top Bottom