Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

Append to 2 different tables?

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
pdvsa
Asked:
pdvsa
  • 3
  • 2
  • 2
2 Solutions
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
I don't think so with a single query.

mx
0
 
Richard DanekeAdjunct FacultyCommented:
You can use SQL statement OR  set up two append queries and run from VBA or a Macro.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:

Just do this:

    CurrentDb.Execute "AppendToTable1", dbFailOnError
    CurrentDb.Execute "AppendToTable2", dbFailOnError
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
pdvsaProject financeAuthor Commented:
But hiw would it append to the correct fields?  I need to have this because the fields do not match.

Thx
0
 
Richard DanekeAdjunct FacultyCommented:
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
 
Richard DanekeAdjunct FacultyCommented:

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
 
pdvsaProject financeAuthor Commented:
Ahhhh... I get it. Was analyzing it too much.  Thx
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now