Default entries ?

Guillaume777

Registered User.
Local time
Yesterday, 18:19
Joined
May 4, 2006
Messages
23
Say I have table called "project" that hold info like project name, project date, # of project, etc.

And I have a table "employee" that hold info like name, salary, # of employee, etc.

Project and employee are linked together ( many to many ) on a junction table. Basically "# of project" and "# of employee" are connected in a junction table.

As such it is easy to add or remove people off a project.

However many people are present in nearly all projects. As such I'd like to make it so that each time a new project is created, it assign those people to the project by default.

Is there a way to do this ?
 
Pat Hartman said:
You'd have to write the code to insert the necessary relation records. You'll need to add a column to the employee table so you can mark the employees that you want to always add to a new project.

So, in the AfterUpdate event of the form that adds new projects, run the append query that will select the "always" employees and append their records to the relation table for the new project.

Great idea ! I didn't think of AfterUpdate..... I was thinking only in terms of query. You really helped me here ;)
 

Users who are viewing this thread

Back
Top Bottom