Need to use existing ID

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Need to use existing ID

Post by Peter Kinross »

Help, I'm getting rusty. :scratch:
When I make an entry into this query it puts a new ID into the new record in tblClientsOnBoarding - which is understandable.
I want the ID from tblContacts to be used. How do I do that?
WrongID.jpg
You do not have the required permissions to view the files attached to this post.
Avagr8day, regards, Peter

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Re: Need to use existing ID

Post by Peter Kinross »

Dang. I had the ID on tblOnBoarding set to AutoNumber. Changed to Long and we are cooking.
Sorry to trouble you all.
Avagr8day, regards, Peter

Gasman
StarLounger
Posts: 81
Joined: 22 Feb 2022, 09:04

Re: Need to use existing ID

Post by Gasman »

I would still have an autonumber field, just not all called ID.
I would have another field, Long as you indicated for the foreign key.
Using Access 2007.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Re: Need to use existing ID

Post by Peter Kinross »

Thanks Gasman. (does that mean you have gas? :laugh: )
I only want 1 ID, no need for anything else to delineate each record. On top of that, it is working - well so far.
Avagr8day, regards, Peter