View Full Version : Auto add records to related table


Sandre
07-29-2004, 09:35 AM
I work for a small charity which funds youth projects (before you ask - "No!" - lol).

Every time I add a new project to my database, there is a chain of events from 'initial contact' through to 'funding decision' and a further chain of events from 'funding decision' to 'award completed'. Each 'event' is a separate record. Projects are on one table, 'Event', 'date due', 'date completed' on a second related table (with project, of course, being the common field).

What I want to be able to do every time a project is added on 'Projects' is automatically create the records for the first chain of events in 'Events' to make sure that the whole process is followed.

Then, as a separate procedure, if we decide to fund the project, be able to click a button (or something!) to add the records for the second chain of events.

Was sure this had to have been asked about before... I have tried searching on auto update, auto increment and even 'adding records to a related table' but haven't found anything quite right - if this has come up before then please let me know (& if I'm using the wrong technical terms, tell me :p ).

Alternatively, any ideas most gratefully appreciated.

TVM in advance

Sandre

monkeytunes
07-29-2004, 10:13 AM
Sounds like you need an Append Query. There's been a fair amount of discussion on this in the past week or two, people have been asking how to set up survey databases (http://www.access-programmers.co.uk/forums/showthread.php?t=69629). You can set an Append Query to run using a Macro or VB in the "After Update" event of your Form, or using a specific button on the Form. Search for Append Query or "survey" on the forums for more info. Hope that helps!

Sandre
07-30-2004, 01:24 AM
Thanks monkeytunes :-)