Solved

Insert Statement when using a subfor

Posted on 2015-01-07
7
72 Views
Last Modified: 2015-01-12
Can I use a Insert statement for fields in the Main form and the sub form??
0
Comment
Question by:Jass Saini
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 84
Comment Utility
What do you mean - you want to INSERT data into a record, and then show it via a Main form and Subform?

Or you want to take data from a Main form and Subform and INSERT that data somewhere?
0
 

Author Comment

by:Jass Saini
Comment Utility
Take the data from a Main form and subform and insert into a table
0
 
LVL 19

Expert Comment

by:Eric Sherman
Comment Utility
Generally you would take the data from the underlying table of the form/subform and insert into another table.  Can you provide a sample of what you are trying to accomplish.

ET
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Then lets drop the term "Insert Statement"
...and just say: "Take the data from a Main form and subform and insert into a table "

When you specify "Insert Statement", ...you seem to be specifying the exact technology (SQL *Insert statements*, in his case) that you want us to uses, ...despite the fact that there may be other ways to accomplish this...

That all being said, ...I have to ask why you need to do this...?
The very nature of a one to many relationship is to avoid having one table with two different sets of data, ...not to mention the fact that if you do this, you would would create redundant data, (that would need a mechanism for being updated when the source data changes)

The typical way of dealing with this is to make a query joining both of your tables.


So you may wish to restate your ultimate need here, ...then experts can recommended the best way to accomplish this...

JeffCoachman
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
Comment Utility
Here is a sample of a *query* that displays mainform/subform (Parent/Child) data.
(It can be filtered as well)
...but I think this addresses your question here as I understand it...
Database50.mdb
0
 
LVL 19

Expert Comment

by:Eric Sherman
Comment Utility
I agree, we need an example of what you are trying to accomplish as there's usually a little cleaner way without having to duplicate the same information in various tables.

ET
0
 

Author Closing Comment

by:Jass Saini
Comment Utility
Thank You
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now