PC Review


Reply
Thread Tools Rate Thread

Adding Record/Records

 
 
=?Utf-8?B?SGFyZGRyaXZlNzQ3?=
Guest
Posts: n/a
 
      17th Nov 2004
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIEJ1eWVucw==?=
Guest
Posts: n/a
 
      17th Nov 2004
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)
|/---------------------------------------------------
*----------------------------------------------------


"Harddrive747" wrote:

> 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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Many Records to Unsaved One Record =?Utf-8?B?TXVycA==?= Microsoft Access Form Coding 3 15th Feb 2007 05:24 PM
adding records if record source is query =?Utf-8?B?U2FuZHlS?= Microsoft Access Forms 6 1st May 2006 06:15 PM
Stop 'next record' from adding from adding records Ynot Microsoft Access Form Coding 6 12th Dec 2005 01:20 AM
Adding Related Records to New Record =?Utf-8?B?U2hlbGRvbiBQZW5uZXI=?= Microsoft Access Form Coding 13 28th Oct 2004 04:37 PM
Adding Records to a Record set =?Utf-8?B?R2VvZmYgTXVybGV5?= Microsoft ADO .NET 3 16th Mar 2004 11:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 AM.