My client is currently using an access database (10 years old), so I am stuck with the table structure used there to a great extent.
In order to keep track of correspondence they first create an Activity (in Activities table). If they then send a letter an entry is made in the Correspondence table that is linked to the record in the Activities table. Obviously this is a very time-consuming process - If they send out a mailshot to 200 people, they have to manually input 400 records.
I have created a table that stores addresses etc so that the client can create a mailing list. Using this, I can create the records for the Activity and Correspondence tables.
My problem is how to link the two. i.e.: Each record in the Correspondence table MUST be linked to a record in the Activities table by means of the unique ActivityID field. If I use a script to create the Activity record (ActivityID field is AutoInc) how can I then place this auto-generated ActivityID into the corresponding Correspondence record?
Because this needs to create multiple records in both tables I am assuming that I need to use some for of do-loop routine i.e. create the Activity record, read the ActivityID field, create the Correspondence record with ActivityID field, move on to next.
Any help would be really appreciated on this one - it's driving me nuts.
In order to keep track of correspondence they first create an Activity (in Activities table). If they then send a letter an entry is made in the Correspondence table that is linked to the record in the Activities table. Obviously this is a very time-consuming process - If they send out a mailshot to 200 people, they have to manually input 400 records.
I have created a table that stores addresses etc so that the client can create a mailing list. Using this, I can create the records for the Activity and Correspondence tables.
My problem is how to link the two. i.e.: Each record in the Correspondence table MUST be linked to a record in the Activities table by means of the unique ActivityID field. If I use a script to create the Activity record (ActivityID field is AutoInc) how can I then place this auto-generated ActivityID into the corresponding Correspondence record?
Because this needs to create multiple records in both tables I am assuming that I need to use some for of do-loop routine i.e. create the Activity record, read the ActivityID field, create the Correspondence record with ActivityID field, move on to next.
Any help would be really appreciated on this one - it's driving me nuts.
Comment