Solved

Append Query

Posted on 2013-06-12
4
632 Views
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
Russell
0
Comment
Question by:russell12
[X]
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
4 Comments
 
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..

HTH,

Kent
0
 
LVL 2

Author Comment

by:russell12
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.
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 39242643
Kent,

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

:)

russell12,

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


Patrick
0
 
LVL 2

Author Closing Comment

by:russell12
ID: 39242675
Patrick,
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!!
Russell
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

636 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