Selecting a table to use

me2

Board Regular
Joined
Feb 1, 2005
Messages
112
Background: every week my department gets an excel file that needs to be sent out to different people so they can "do their stuff" on their own portion of it. Now that I have successfully created an Access tool to parse out the file to the people who need it, my boss wants more. Now I need to compare this week's file with last week's file and flag what is still there.

Originally I set up my queries to use a generically named table: tblEPReport. But now I have many tables in the database with the naming format of tblEPR2005-mm-dd. I am manually over-writing the tblEPReport with a copy of the most recent tblEPR2005-mm-dd. I have a tblPriorEPR that I manually overwrite with a copy of the prior week’s file.

I’d like to be able to automate this because I some times forget to change every thing. Any suggestions? Can I set up something that will allow me to select which table becomes the tblEPReport and which is the tblPriorEPR.

TIA,

me2
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Why don't you just use a single table? Rather than name the tables with a date, set up your spreadsheet with a date field that is unique for the weekly batch. Then import it to a single table. Then by using queries you can compare the data based on restricting records with criteria.

The only issue here is whether or not you have data that is unique. Meaning can you set one of the fields to not allow duplicates so you can't accidently import the same data twice.

I use an Import Routine that checks Excel linked Table for a date in one of the fields, if it is newer, it will import. If not nothing happens

Explain what you are doing with the data in more detail, the way you are doing it is the same as creating an Excel file and then saving as a file in a folder.

Automation can be added later
 
Upvote 0

Forum statistics

Threads
1,221,905
Messages
6,162,772
Members
451,786
Latest member
CALEB23

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