J
|
Jane 10/20/2006 |
Hi, Sub AfterAdd() str = "select @@IDENTITY from MasterTableName" Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection Session("foreignkey") = rsTemp(0) End Sub
|
T
|
tgunther author 10/20/2006 |
Thanks! That worked great! I just have one more question I would like to make it so that once a header record is made it takes them directly to the add detail page for that header record, so that they are forced to have at least one detail record per header record. |
![]() |
Sergey Kornilov admin 10/23/2006 |
Here is how you can do this. Sub AfterAdd() |
T
|
tgunther author 10/23/2006 |
Thank you for your help I greatly appreciate it. I have tried to implement the new code that you gave me unfortunately it still does not work. I recieve an error that there is an incorrect syntax near keyword key. Here is the code I have modified for my situation: Sub AfterAdd()
|
![]() |
Sergey Kornilov admin 10/23/2006 |
You are not following the code I posted. Sub AfterAdd() |