Adding Record/Records

H

Harddrive747

I'm in the process of creating a form where I capture activity information.
In this form there will be up to two different contacts. Let me give you the
way the table in the database will work.

Table: Activities Activity_Contact Contact
fields: Activity_ID Activity_ID Contact_ID Contact_ID
Records: 1 1 4 4
1 9
9

So basically the Activity_Contact table contains the Activity ID and Contact
ID. This way, I can have up to two contacts per activity.

I have looked on the web and discovered that I can use an SQL query to
insert records into a table. I can do see doing this for one record, but
what about the second contact? How would I go about adding that to the table?

I can do the activity table by sending it to the database when I click the
submit button and then add the record to the Activity_Contact table after I
get the new ID. But adding the second contact is what I need help with.

The update should be pretty easy because I will have all the information.
Just wondering how to make it update two records instead of one.

Any question, please let me know.
Terry
 
J

Jim Buyens

Execute two SQL statements.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top