473,231 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 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 2329
32,554 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

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

Similar topics

by: Caroline | last post by:
I seem to always want to do this type of join, but I can never find how to do this. I am trying to join two tables. The parent table will always have one row of data and the child may have 0 to...
by: vishnu mahendra | last post by:
I have two table both say A and B. If i insert a record in A that record should be inserted in B. If i delete a record in A that record should be deleted from B. Is that possible.If yes please...
by: jaYPee | last post by:
as of now i am using a stored procedure from my sql server 2000 to insert record from another table. what i need now is on how can i insert record by not using the stored procedure and insert it...
by: PAUL | last post by:
Hello, I have 2 datasets I am trying to update. The parent table seems to update fine but when I go update the chiled table I get an error message that says I need a related record in the parent...
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
by: swatijogdand | last post by:
Hi all, I want to insert a record at a time from front end i.e. vba in a table located on sql server. But, one field on that table has an 'identity' constraint which is not enabling me to insert...
by: Rohullah | last post by:
I want to insert record into two table at a time. For example i have two table student1 and student2 with the same structure now i want to insert record into student1 the record of student1 should...
by: Begood | last post by:
http://s3.postimg.org/k7aq1v1tf/Captureddd.png I want to write a Stored Procedure for these 2 tables , I have this SP but it doesn't achieve my point.. CREATE proc . @prdctName...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.