Using Access2000. Anyway to do it with that as my database?
-----Original Message-----
From: Clint Tredway [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 9:29 AM
To: [EMAIL PROTECTED]
Subject: Re: Inserting records into a parent and child tables on the
same acti
what database are you using?
IF you are using SQL server, you could write a stored procedure that does
all this for you(add/update parent and then insert the children).
That is what I would do. If you need help, I will gladly help you.
Clint
---------- Original Message ----------------------------------
From: "Susan N. Klos" <[EMAIL PROTECTED]>
Date: Thu, 16 Aug 2001 09:18:02 -0400
I have a form with a checkbox on it. If the checkbox is checked the action
page puts a not in the parent table and the user is redirected to another
page. If the user does not put a check in the box, they are supposed to
fill out the rest of the form. On this form are formfields which insert
records in child tables as well as updating some information in the parent
table. I want the action page to:
Check to see if the first checkbox is checked
if checked
insert a record in the parent table
put no in the appropriate field
Send user to another page
If not checked
insert a record
put yes in the appropriate field
Continue with the rest of the code on the page
Rest of code:
Insert into a child table putting the PK from the Parent table into the FK
field of the child table
Update some fields on the Parent table
Insert into a child table putting the PK from the parent table into the FK
field of the child table
I have gotten around this before by having the user submit the checkbox and
then go on and submit the rest of the page.
Is there a way to do it all on one action page thereby only using one submit
button?
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org