Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Append Query

Posted on 2013-06-12
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 93

Accepted Solution

Patrick Matthews earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

730 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