Create New Records For Quantity

Discussion created by moodog on Dec 6, 2016
Latest reply on Dec 6, 2016 by moodog

Looking for a little help on the best way I can do this. I have a main layout table for Raffle Participants. Name, Address etc... Number of tickets is a drop down field (TicketQTY). 1, 2, 3, 4, 5, etc....


A new Participant is entered, the number of tickets is picked from a drop down box.


I have a create ticket button on the form. I would like the script to create the tickets.


I already have a ticket table with TicketID and a Relationship to ParticipantID. So the script would need to create (TicketQTY) X new records in the ticket table and populate ParticipantID. So if we select "5" then 5 new records are created in the ticket table.


I can easily do this for 1, but getting it to count the number of new records is where Im a little lost. Do I loop or can I actually say create 5 records?


Any help greatly appreciated...