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
12
Office Version
  1. 2016
Platform
  1. Windows
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!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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