How to append a table mutiple times

DBASE

New member
Local time
Today, 15:24
Joined
Jan 11, 2011
Messages
2
I have a table with orders; there is a quatity column based on this quantity column I would like to create and print the orders; i.e is one quatity on each order. I have decided to append the table but the quatity can go all the way up to 5,000, etc. holw do i create a loop to append the table based on the quatity and is there a better way to do this.
 
I there a reason why you need to only have one itemn per order? Can you give a working example please?
 
I have an order sheet with

Quatity Product

20 Watch band Red

I need to pass them out to be individually done to may be 20 different persons. Hence 20 different order sheet need to be distributed to each idividual. I order to have it printed that way i need to append table 19 times.
 
Try something like this:

Dim intQuantity as Integer
Dim strSQLINSERT as String

intQuantity = X

Do Until intQuantity = 0
StrSQLINSERT = "INSERT INTO
([Field1], [Field2])" _
& " Values([Field1], [Field2]);"
DoCmd.RunSQL strSQLINSERT
intQuantity = intQuantity -1
Loop
 

Users who are viewing this thread

Back
Top Bottom