afrausto
Posts: 66
|
| Posted: 09/08/2005, 5:25 PM |
|
Hello,
Can anyone give me some direction with this. I have an editable grid that only allows a user to insert new data into Table A. That's the easy part. The next step is I would like to insert a new record into Table B based on what the user entered into Field1. For example, If TableA:Field1 = "True" , then Insert a new record into TableB and set TableB:SID = TableA:ID. Where ID is the Autonumber created when the new record(s) where inserted into Table A.
Thanks in advance for any suggestions.
|
 |
 |
Edd
Posts: 547
|
| Posted: 09/09/2005, 4:54 AM |
|
I am assuming you are using a good database (Not MSAccess) and if so all good databases support triggers.
I would suggest that you use a trigger on the table and populate your send table that way.
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
afrausto
Posts: 66
|
| Posted: 09/09/2005, 8:59 AM |
|
Edd,
I guess I should have stipulated the database I'm using. Unfortunately it's MS Access in this case. Any suggestions, other than swtiching to another database?
Is it possible to loop through the records within After Execute Insert event and then use one of the fields to pull the record ID in Table A and insert only those that meet the criteria? For example, Field2 in TableA must be unique. Couldn't I use this criteria to obtain TableA:ID and then select only those where TableA:Field1 = "True"?
Thanks for your input.
|
 |
 |
|