MS Access Coding - Edit SavedImportExport - Variable file name

D

Drew Boyd

I have developed a reporting database that imports data/tables from another
database. The only way I can get the information into Access is via HTML
table exports from the other tool.

So I decided to use the saved import capability of Access 2007. I found out
too late that the path and filename you provided when saving the import is
not relative. In otherwords the file to import must always be at
"C:\Reporting_db\ILS SDE Exports\<FileName>.

What this means is that for the saved imports to work I will always have to
place the db in the same location. This is not good as I need to move it
around.

Using code I can build the full path "C:\Reporting_db\ILS SDE
Exports\<FileName>.
by appending texgt as follows:

"CurrentProject.Path & "\ILS SDE Report Exports\" & TargetFileName"

The problem I am having is that I cannot programatically edit the saved
import file name.

Does anyone know how I can do this? Or is there another approach I can use
import from variable locations?

Any help would be much appreciated.
 
C

Clifford Bass

Hi Drew,

This snippet of code should get you pointed in the right direction:

With CurrentProject.ImportExportSpecifications("Export-tblBirthdays")
MsgBox .XML
.XML = Replace(.XML, "C:\", "D:\")
MsgBox .XML
End With

Clifford Bass
 

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