MS Couple of questions from beginner

arukort12

New Member
Joined
Jul 28, 2017
Messages
1
Hello all,
at the beginning I need to say that I'm just starting my journey with access, I couldn't find answers on the internet though. I have few questions regarding ms access. I made a button which allows me to import excel file to access (for example: I import the first excel file - access makes first table with data from that file, I import the second file - the second table is made etc.). Now I want to make a one query with certain columns (just couple of columns out of ~40 to be honest) with data from all of the tables that I have imported in to access. Is there a way to 'automatize' that process? By pressing the button for example, which would 'update' (by update I mean just adding a specified data from the new imported excel file to the query) the query. If yes - where can I look for the solution?
Best regards,
Adam.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I import the first excel file - access makes first table with data from that file, I import the second file - the second table is made etc

Why are you doing this... it is not good practice to import similar data into different tables, if the spread sheets all contains the same columns then they should be stored in one table within access and if required have a field on there to distinguish between them.

It may be straight forward with 2 or 3 tables to pull them all into a query, cut to 6 months and you have 20-30+ tables it becomes a nightmare to manage.

Having said that if there is a genuine reason for doing this (can't think of many), then investigate a union query.... to do it dynamically you would need to keep a record of the table names and use code to edit a query definition.
 
Upvote 0
Welcome to the Board!

As was suggested, just import both files into the same Access table. Then your task becomes easy.
A general rule in Access is if you have multiple tables with the same structure, that is probably bad design. They probably should all be in the same table.
You can always set up queries to view just a specific subset of records.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top