Is there a way in Excel to connect to an Access database even if the file name of the Access db changes, given it has a fixed prefix?

noname91

New Member
Joined
Jul 5, 2018
Messages
3
Hi all,

Not sure if this is the right place, hopefully is. I tried looking online but couldn't find anything on this. Basically, I have an Excel spreadsheet where I pulled data from an Access database using the "From Access" button and following the instructions. The database was imported successfully, I added the macros that were needed in the spreadsheet, and making changes in the .accdb data and refreshing works fine too.

However, it seems the accdb file's name is supposed to change and there is no fixed interval for this. This means that connectivity cannot be maintained. The accdb file's name format is simply "Stuff Access Database [Month] [Day]", for example "Stuff Access Database March 23". The file name could change from "Stuff Access Database March 23" to any date suffix like "Stuff Access Database April 16" since there is no fixed interval that can help to automate the process. Is there a way to maintain the connectivity by, say, checking only if the file has "Stuff Access Database" as a prefix, rather than the whole name? No other file in the directory has this same prefix.

Thanks!
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Watch MrExcel Video

Forum statistics

Threads
1,127,443
Messages
5,624,806
Members
416,055
Latest member
EJGAJG

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
Top