Linked Table via Excel w/ Data Connection to an XML File

n9uns

Board Regular
Joined
Sep 10, 2013
Messages
67
I have a linked table in a local Access (2010) database. This linked table contains a table that's connected to an XML file on the server. The reason why I have it set up this way is because from my understanding, Access does not have the ability to create a link to an XML file.

In any case, the XML file is a daily file that gets replaced every day. If I want to view data today (4/24/2019 from some XML file from say 4/15/2019, I wouldn't be able to view the data via the linked table that I created since the XML file that's driving the linked table is overwritten everyday; I'd have to go to the file location and open the XML file from 4/15/2019.

The daily files are saved on the server with a date suffix at the end of the file name.

Example:
Daily Filename: LiveFile.XML​
Historical Filename: LiveFile_190415.XML​

Is there a way to have the linked table look at a different XML file based on a date in an access form?

Example:
If I have a date of 4/15/2019 in some form in my local database, can I have the linked table which is currently setup to look at LiveFile.XML look at LiveFile_190415.XML as per the selected date?

Probably could explain better but struggling with this at the moment. Please feel free to tear this up and ask questions.

TIA
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Not sure why this has been moved from the access forum as it an access question (albeit referencing an XML file).

Access doesn't really have a straight forward way of doing this, it would require VBA code, a couple of different ideas for that would be to re-link the table or overwrite the Livefile when the selected date is changed.
 
Upvote 0
if you changed the file name of LiveFile_190415.XML to LiveFile.XML then it should work too, I guess. Assuming you can also change the current LiveFile.XML to LiveFile_XXXXXX.XML. There must be something like this happening already otherwise you wouldn't have all those historical records (either copying or renaming or moving of the current file each day).

I've never heard of Access connecting to an XML file but you should also be able to import an XML file.

You might also be able to just save your data yourself each day so you have your own backups of the daily files (possibly, then, just stored as regular Access data).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,060
Latest member
mtsheetz

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