In Access, is there a way to get the primary key of a record that I just used an SQL INSERT INTO statement on?
What I'm trying to do is create a record in a parent table, then create several records in a child table (one-to-many). Right now, I'm using two seperate INSERT statements, but to do the second I need the primary key from the parent record. Or is there an easier way to do this?
What I'm trying to do is create a record in a parent table, then create several records in a child table (one-to-many). Right now, I'm using two seperate INSERT statements, but to do the second I need the primary key from the parent record. Or is there an easier way to do this?