Create multiple records on-click

W

Wayne-I-M

Hi

I have a subform (continous) that display a number of record related to the
main form.

I can set-value to a control on a record but is it possible to set the value
to a record (on the subform) and then create a new reocrd and set value to
that (I need to create - if possible) up to 6 records on a single click - I
have played around with this for quite a while but getting no-where :-(

******************************

Background - not important, but in case you are interest

Create 1 record
Person A want to fly from London to Paris
On click - create record ID, set value (to 5 controls) to show flight number
time seat etc etc

Create 2 record
Person B want to fly from London to Nepal
On click - create record ID, set value (1st record) flight details London to
Qatar
On click - create record ID, set value (2nd record) flight details Qatar to
Nepal

Create 4 record
Person C want to fly - return - from London to Verona (KLM via Amsterdam)
On click - create record ID, set value (1st record) flight details London to
Amsterdam
On click - create record ID, set value (2nd record) flight details Amsterdam
to Verona
On click - create record ID, set value (3rd record) flight details Verona to
Amsterdam
On click - create record ID, set value (4st record) flight details Amsterdam
to London

I have shown On-Click but this will be taken from a list based on a flight
available table - but an On-Click will do the same to and test the system

Thank you
 
W

Wayne-I-M

Hi Roger

Thanks for that. I tried that method but as the reocrd is not a duplicate
but rather a new record with different information from the otehr records it
will not work

I "think" I almost have it.
On-click
Add Record
Go to control (ID of new record - from DMax of ID's )
Set value
Do Loop and do it again until the/each flight details are put in.
The loop runs to max number (from a simple query count of available flights
for that route).

Bring back my old typewriter I say :)

Many thanks for you tip though.
--
Wayne
Manchester, England.



Roger Carlson said:
I haven't tried this, but there is a Duplicate Record wizard in the button
wizard that will duplicate a record. If you create that in the subform and
then put it in a loop, setting the value at each iteration appropriately...

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
W

Wayne-I-M

Forget everything - I think I will go back to reading my book "how to turn on
your computor"

:)

DoCmd.GoToRecord , , acNewRec
Do stuff here
DoCmd.GoToRecord , , acNewRec
Do more stuff here
DoCmd.GoToRecord , , acNewRec
And even more


This works fine. I think I was over complecating things.

Thanks again Roger

--
Wayne
Manchester, England.



Roger Carlson said:
I haven't tried this, but there is a Duplicate Record wizard in the button
wizard that will duplicate a record. If you create that in the subform and
then put it in a loop, setting the value at each iteration appropriately...

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top