N
Neal
John has given me some code to clone a record on a main sub form. The first
bit clones the data on the main form, and that's fine. When it's done that,
the new record gets the new JobID. I need to get that new ID and use that
to insert the data into the table that holds the subform data.
I am looking at @@Identity to somehow get the new ID but don't know how.
Also I'd then need to modify the next bit (below) to use that.
strSQL = "INSERT INTO [Items] (JobID, this, that, ...)" _
& " SELECT " & Me!JobID & " AS JobID, this, that, ... FROM [Items]" _
& " WHERE [JobID] = " & Me![JobID] & ";"
Any ideas?
Table Jobs (One), key (autonumber) JobID, table Items (many), key ItemID.
Using Access 2003.
Thanks, Neal
bit clones the data on the main form, and that's fine. When it's done that,
the new record gets the new JobID. I need to get that new ID and use that
to insert the data into the table that holds the subform data.
I am looking at @@Identity to somehow get the new ID but don't know how.
Also I'd then need to modify the next bit (below) to use that.
strSQL = "INSERT INTO [Items] (JobID, this, that, ...)" _
& " SELECT " & Me!JobID & " AS JobID, this, that, ... FROM [Items]" _
& " WHERE [JobID] = " & Me![JobID] & ";"
Any ideas?
Table Jobs (One), key (autonumber) JobID, table Items (many), key ItemID.
Using Access 2003.
Thanks, Neal