Switch table source with button

R

Ron

I have an Access MDB that links to dBase files.

The problem is that there is a separate group of dBase
files for each day of the week. The table names are the
same, but you have to get them from a different file.

Right now I'm having to manually go in each day and
redirect where Access is linking. What
I would like to do is set something up along the lines of
having a form with buttons for each day of the week.

So I open the MDB and up pops this form with 5 buttons
(Monday, Tuesday, Wednesday..etc). I click "Monday" and
it automatically links to the Monday dBase file. I
click "Tuesday" and it links to the Tuesday file, and so
on.

Anyone know how I can go about this?

Thanks,
Ron.
 
E

Earl Lewis

Ron,

How about creating a table in your database that stores the location of each
days files. Then on your "5 button form" you could pickup the file location
based on which day was selected and relink base on that selection. In fact
it could be easier than that - Access can figure out the day of the week for
you so you could forego the form and run this process using an autoexec
macro - which runs every time the db is opened.

This would take some coding and familiarity with the connection properties
of tables so if your looking for a code-less solution this won't work.

Let us know if you want to pursue this further. I'm sure you could find some
table linking code examples that could easily be adapted to this situation.

Earl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top