B
Barry A&P
I am trying to get the primary Key "TRKID" (autonumber) of a record that i
just created with the folowing code. so i can use it in another step of code.
DoCmd.RunSQL _
"INSERT INTO T_Parts ( PartNumber, SerialNumber ) SELECT " & _
Me.PartNumberCombo.Column(0) & ", " & Me.SerialNumber_Txt
If a new part is recieved I Create a record in my parts table and from then
on i refer to that part by its TRKID "trackableID" which is a autonumber
field on my T_Parts. once i create the record i want to create a few record
in other tables using the TRKID of the new record inserted by the SQL above
DoCmd.RunSQL _
"INSERT INTO T_Part_Transactions ( TRKID, TransactionNotes,
QuantityRecieved ) SELECT " & _
"How would i get the TRKID Here???" & ", NewPart Recieved, 1"
If My method is flawed i am open to suggestions
Thanks
Barry
just created with the folowing code. so i can use it in another step of code.
DoCmd.RunSQL _
"INSERT INTO T_Parts ( PartNumber, SerialNumber ) SELECT " & _
Me.PartNumberCombo.Column(0) & ", " & Me.SerialNumber_Txt
If a new part is recieved I Create a record in my parts table and from then
on i refer to that part by its TRKID "trackableID" which is a autonumber
field on my T_Parts. once i create the record i want to create a few record
in other tables using the TRKID of the new record inserted by the SQL above
DoCmd.RunSQL _
"INSERT INTO T_Part_Transactions ( TRKID, TransactionNotes,
QuantityRecieved ) SELECT " & _
"How would i get the TRKID Here???" & ", NewPart Recieved, 1"
If My method is flawed i am open to suggestions
Thanks
Barry