468,790 Members | 1,915 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,790 developers. It's quick & easy.

How to insert a record set into multiple the parent table and child table in a one to many relation

Hi evryone,
i am sure you have probably had this questions several times. I am new to Access, so please bear with me.
i have data on an excel sheet imported into my access database. and this data needs to be inserted into two tables. The parent table is linked to the Child table with the help of a primary key in a one to many relation. i can insert the data i need into the Parent table but i get stuck at the second level , that is, the data which need to go into the child table does not do that.

I am trying to SQL with the INSERT INTO, but i am not sure I am writing it correctly.
Someone suggested using VBA to do this, but as I said, I am new.

can any one help me out her. show me how to start?
thanks alot
4 Weeks Ago #1
1 1833
32,132 Expert Mod 16PB
Hi Veronica.

Welcome to Bytes.com.

Please understand, no matter how much we'd like to help, telling you where you've gone wrong is always going to be difficult until you share what it is you're doing.

When populating data into a Child table it is often first necessary to populate the Parent table. Have you done this successfully first? If not then you'll struggle but your post indicates that you probably have.

What data are you working with? Example data is fine.

What have you tried that isn't working? It's far easier to explain something that you can understand if we start with something you know. If you have some SQL that's close and just needs a small change that's so much easier for you to understand than writing it from scratch.

From what you've written so far I assume you're working in SQL but using QueryDef (Saved Query) objects. That's fine but if not correct we absolutely need to know.
4 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.