Linq,
You are absolutely right.
Since the OPs first 3 posts failed to say anything about a "child" record or
table, I failed to pickup on that last post. But my solution does give the
ID number that he/she is looking for, without having to declare a separate
variable for each control on the form, and then set that variable for each
field in the current record, and then go to a new record and reverse that
process, and (oh wait, that method doesn't account for "child" records
either).
So all the OP needs to do is write a parameter query that copies records in
her "child" table, based on the parameter, something like:
Parameters [NewID] long, [OldID] long;
INSERT INTO tblChildTable (IDNumber, Field2, Field3, Field4)
SELECT [NewID], Field2, Field3, Field4
FROM tblChildTable
WHERE [IDNumber] = [OldID]
Once saved, all the OP has to do is:
Dim qdf as dao.querydef
set qdf = currentdb.querydefs("queryName")
qdf.parameters(0) = varNewID
qdf.parameters(1) = me.IDNumber
qdf.execute
Once this is complete, then add the code that takes the user to the new
record (from my last post).
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
"Linq Adams via AccessMonster.com" wrote:
> "The problem is copying the CHILD records and having them linked to the new
> parent record. "
>
> Unless there is a post in this thread that isn't visible to me, you have
> never mentioned trying to copy CHILD records! You really need to post little
> details like that when you originate a thread!
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200902/1
>
>