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
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 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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