G
Guest
I thought I had this issue cracked from a previous post - but it's run amok
on me.
I have a Contact form (derived from a Contact Table) and within that I have
a Notes subform (derived from a Notes table)
There are occassions when I want to add a Note Record to specific Contact
Records that says something like "Fax sent to client on 28/2/2006 requestion
donation)
I created a select query (as per Duane's advice below) and then an append
query to add a new notes record - so far so good. It added a new notes
record to 100 selected records. I then ran the append query again to see
what would happen and it added the new notes TWICE to each record (ie -
you're about to append 200 records), the third time it added it FOUR times
and so on.
How do I get it to only add the new notes ONCE to each contact
Here's the SQL
INSERT INTO Notes ( ID, [Date], UserInitials, Comments )
SELECT Contacts.ID, Date() AS [Date], "SK" AS UserInitials, "What about
this" AS Comments
FROM Contacts INNER JOIN Notes ON Contacts.ID = Notes.ID
WHERE (((Contacts.[Contact Type])="Area Coordinator"));
You can create a query based on your Contacts table. Add the ParentID field
to the grid. Create more columns in the grid like
Comments: "These are your comments to append"
DateField: Date()
--others--
Set a criteria on this query so that it only returns the ParentIDs that you
want appended. Change the query to an append query and choose to append to
your Notes table. Select the appropriate append to fields from Notes so that
the values get pushed into the proper fields.
Run the append query.
If you have a problem, you MUST come back with the SQL view of your append
query.
on me.
I have a Contact form (derived from a Contact Table) and within that I have
a Notes subform (derived from a Notes table)
There are occassions when I want to add a Note Record to specific Contact
Records that says something like "Fax sent to client on 28/2/2006 requestion
donation)
I created a select query (as per Duane's advice below) and then an append
query to add a new notes record - so far so good. It added a new notes
record to 100 selected records. I then ran the append query again to see
what would happen and it added the new notes TWICE to each record (ie -
you're about to append 200 records), the third time it added it FOUR times
and so on.
How do I get it to only add the new notes ONCE to each contact
Here's the SQL
INSERT INTO Notes ( ID, [Date], UserInitials, Comments )
SELECT Contacts.ID, Date() AS [Date], "SK" AS UserInitials, "What about
this" AS Comments
FROM Contacts INNER JOIN Notes ON Contacts.ID = Notes.ID
WHERE (((Contacts.[Contact Type])="Area Coordinator"));
You can create a query based on your Contacts table. Add the ParentID field
to the grid. Create more columns in the grid like
Comments: "These are your comments to append"
DateField: Date()
--others--
Set a criteria on this query so that it only returns the ParentIDs that you
want appended. Change the query to an append query and choose to append to
your Notes table. Select the appropriate append to fields from Notes so that
the values get pushed into the proper fields.
Run the append query.
If you have a problem, you MUST come back with the SQL view of your append
query.