Append Query

Posted on 2013-06-12
Last Modified: 2013-06-12
I have a database that I need to run an append query from tblparts to tblworkordersub.  I have it working, the only problem is I need it to also append some of the textboxes from frmworkordersub.  I can not think of how to do this.  I have done this before many years ago, but can not remember what database app I did it in or how I did it.  So any help would be greatly appreciated!
Thanks in advance
Question by:russell12
  • 2
LVL 17

Expert Comment

by:Kent Dyer
ID: 39242594
In Access, isn't there a Query Wizard?  Or Append Wizard that does this for you?

Technically, in SQL, it is called an INSERT INTO Query..



Author Comment

ID: 39242607
Yes and I have done that this is the outcome:
INSERT INTO tblworkordersub ( Part, PartDollars, Labor, LaborDollars, Catagory )
SELECT tblparts.Part, tblparts.PartDollars, tblparts.Labor, tblparts.LaborDollars, tblparts.Catagory
FROM tblparts
WHERE (((tblparts.SercviceCode)=[Forms]![frmworkorder]![frmsubworkorder].[Form]![Catagory]));
But the problem is I need to insert 5 more fields into tblworkordersub that will come from the form frmsubworkorder.
This append query does work, but it is not carrying over the techs name, id, etc.  All that will come from the form frmsubworkorder.
LVL 92

Accepted Solution

Patrick Matthews earned 500 total points
ID: 39242643

While the actual SQL statement used is indeed INSERT INTO, in the Access UI it is referred to as an "append query".



Have you tried:

INSERT INTO tblworkordersub ( Part, PartDollars, Labor, LaborDollars, Catagory,
tech_name )
SELECT tblparts.Part, tblparts.PartDollars, tblparts.Labor, tblparts.LaborDollars, tblparts.Catagory, [Forms]![frmworkorder]![frmsubworkorder].[Form]![tech_name]
FROM tblparts
WHERE (((tblparts.SercviceCode)=[Forms]![frmworkorder]![frmsubworkorder].[Form]![Catagory]));

Open in new window


Author Closing Comment

ID: 39242675
THANK YOU!!! I have been messing with this for 2 hrs trying to find my old db and trying to write it! Thanks a lot!!

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Access 2016 - Query Challenge 15 51
add more styles to my code 2 19
Help with SQl and UNION 3 19
select over clause 1 0
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

760 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

22 Experts available now in Live!

Get 1:1 Help Now