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

x
?
Solved

Append to 2 different tables?

Posted on 2011-09-29
7
Medium Priority
?
451 Views
Last Modified: 2013-11-27
Experts,

I am crafting an Append Qry.
I need to Append to 2 different tables.

Is this possible?  I only see a way to select 1 Append to table.

thank you
0
Comment
Question by:pdvsa
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 75
ID: 36816414
I don't think so with a single query.

mx
0
 
LVL 19

Assisted Solution

by:Richard Daneke
Richard Daneke earned 1000 total points
ID: 36816442
You can use SQL statement OR  set up two append queries and run from VBA or a Macro.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 36816474

Just do this:

    CurrentDb.Execute "AppendToTable1", dbFailOnError
    CurrentDb.Execute "AppendToTable2", dbFailOnError
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:pdvsa
ID: 36817626
But hiw would it append to the correct fields?  I need to have this because the fields do not match.

Thx
0
 
LVL 19

Expert Comment

by:Richard Daneke
ID: 36817691
What we are suggesting is to create two append queries.  Design them to append to the fields in the tables as needed.
To use the append queries,
  you can run them individually,  
  you can use BA  code
    CurrentDb.Execute "AppendToTable1", dbFailOnError
    CurrentDb.Execute "AppendToTable2", dbFailOnError
  or you can create a macro to run the two queries.
You have an operational question on how to run two append queries and not a coding question on how to append to two tables.
Access desing mode will restrict you to append records to only one table.
0
 
LVL 19

Expert Comment

by:Richard Daneke
ID: 36817718

Correcting spelling mistakes:
What we are suggesting is to create two append queries.  Design them to append to the fields in the tables as needed.
To use the append queries:
  you can run them individually,  
  you can use VBA  code
    CurrentDb.Execute "AppendToTable1", dbFailOnError
    CurrentDb.Execute "AppendToTable2", dbFailOnError

  or you can create a macro to run the two queries.
You have an operational question on how to run two append queries and not a coding question on how to append to two tables.
Access query design view will restrict you to append records to only one table (which must already exist).
0
 

Author Closing Comment

by:pdvsa
ID: 36817927
Ahhhh... I get it. Was analyzing it too much.  Thx
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

719 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