M
Melissa
I have a recruiting database consisting of these three
tables (among many others):
tblRecruits
tblInteractions
tblEvaluations
I have a one-to-many relationship between tblRecruits and
tblInteractions, and the same between tblRecruits and
tblEvaluations. I have enforced referential integrity and
have cascaded updates but not deletes (because I have
been warned that it can lead to unintended deletions).
These relationships are set up in the relationships
window of the database.
At the end of the year, I want to be able to run a macro
that accomplishes the following:
1. Asks user to Enter Class to Delete.
2. Appends all recruit records to tblRecruitArchives
(because in rare instances user may need to retrieve
these records).
3. Appends all related recruit interactions to
tblRecruitInteractionsArchives.
4. Appends all related recruit evaluations to
tblRecruitEvaluationsArchives.
5. Deletes appended recruit, interaction and evaluation
records from the original tables.
6. Compacts and repairs database.
My questions are:
A. Is this possible? If so, please give specific
instructions. I know how to create append and delete
queries, but I am a rookie when it comes to macros.
B. In running an append and delete macro, the warnings
for appending and deleting appear. This would be fine for
verifying the number of recruits...but I do not want the
user seeing warnings about interactions or evaluations.
Is this possible?
C. If I change the relationships to cascade delete, will
this simplify the whole process?
D. Can you give me specific information on how to program
the compact and repair portion of this process?
Many, many thanks for your help.
tables (among many others):
tblRecruits
tblInteractions
tblEvaluations
I have a one-to-many relationship between tblRecruits and
tblInteractions, and the same between tblRecruits and
tblEvaluations. I have enforced referential integrity and
have cascaded updates but not deletes (because I have
been warned that it can lead to unintended deletions).
These relationships are set up in the relationships
window of the database.
At the end of the year, I want to be able to run a macro
that accomplishes the following:
1. Asks user to Enter Class to Delete.
2. Appends all recruit records to tblRecruitArchives
(because in rare instances user may need to retrieve
these records).
3. Appends all related recruit interactions to
tblRecruitInteractionsArchives.
4. Appends all related recruit evaluations to
tblRecruitEvaluationsArchives.
5. Deletes appended recruit, interaction and evaluation
records from the original tables.
6. Compacts and repairs database.
My questions are:
A. Is this possible? If so, please give specific
instructions. I know how to create append and delete
queries, but I am a rookie when it comes to macros.
B. In running an append and delete macro, the warnings
for appending and deleting appear. This would be fine for
verifying the number of recruits...but I do not want the
user seeing warnings about interactions or evaluations.
Is this possible?
C. If I change the relationships to cascade delete, will
this simplify the whole process?
D. Can you give me specific information on how to program
the compact and repair portion of this process?
Many, many thanks for your help.