Shepenwepet
New member
- Local time
- Today, 15:20
- Joined
- Aug 28, 2006
- Messages
- 6
I have three tables as below, linked by a many-to-many relationship.
Contact Table
ContactID (PK-Autonumber)
Contact details...
Mailing Table
MailID (PK-Autonumber)
ContactID (FK)
NewsletterID (FK)
Details...
ynMailed
Newsletter Table
NewsletterID
Details...
My Problem: I have acquired 200 customers in one month, and I have to MANUALLY assign each bulk mailing recipient. This will not do. I've experimented with Queries to do the work for me, but keep tripping over a foreign key violation.
My Question: How can I create many records in the Mailing table with a constant Newsletter ID and whichever contacts my Select query returns? How do I populate the SECOND foreign key (the constant Newsletter ID) so I don't get the key violation?
I thought about doing a Make Table Query based on my Select Query, then an Update query to create the second foreign key, then an Append query with all the values in place. Is there an easier way?
I feel like this should be really easy, but two weeks of tinkering have gotten me nowhere. A nudge in the right direction would be greatly appreciated.
Contact Table
ContactID (PK-Autonumber)
Contact details...
Mailing Table
MailID (PK-Autonumber)
ContactID (FK)
NewsletterID (FK)
Details...
ynMailed
Newsletter Table
NewsletterID
Details...
My Problem: I have acquired 200 customers in one month, and I have to MANUALLY assign each bulk mailing recipient. This will not do. I've experimented with Queries to do the work for me, but keep tripping over a foreign key violation.
My Question: How can I create many records in the Mailing table with a constant Newsletter ID and whichever contacts my Select query returns? How do I populate the SECOND foreign key (the constant Newsletter ID) so I don't get the key violation?
I thought about doing a Make Table Query based on my Select Query, then an Update query to create the second foreign key, then an Append query with all the values in place. Is there an easier way?
I feel like this should be really easy, but two weeks of tinkering have gotten me nowhere. A nudge in the right direction would be greatly appreciated.