Question Create Multiple Records From One

wezhogan

Registered User.
Local time
Today, 09:59
Joined
May 24, 2012
Messages
16
I have searched and searched using various key words but cannot find the answer to my question. I have three tables: tblClient (for basic client information), tblDischarge (for client discharge information), and tblAppointments (for appointments that are added to an outlook calender). All three tables are linked using the IDNumber from the Client table. I have a form where a user inputs a discharge date for the client. Once that date has been added I need to add 5 records to the Appointments table for different followup times based on that discharge date (such as one month, two months, three months, etc.). I have the code working to add an individual appointment to outlook but not 5 different ones at one time. So the question I have is how to add the 5 records based on the one discharge date?

I hope this makes sense. Thanks

Louise
 
Surround the code you currently have with a loop and run that loop 5 times.


Code:
For i = 1 To 5
    ' Description of what code does 

    Put Your Code Here
 
    Next i

You will have to reconfigure your code to use i, so that it each time you run it the appointment data you generate is different. If you need help, post the code you currently have that correctly makes that 1 appointment.
 

Users who are viewing this thread

Back
Top Bottom