471,874 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,874 software developers and data experts.

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
Jul 6 '21 #1
1 2155
32,468 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.
Jul 6 '21 #2

Post your reply

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

Similar topics

reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.