Datasourcemoniker issue with .mde file

C

cocoflipper

I have an Access process that imports a datasource from the current database
I am using. Here's the code:

zDataSourceZ = Application.CurrentProject.FullName & "!qry_ZipData"
Set objDataSet1 = objDataSets.ImportData(zDataSourceZ, ,
geoCountryUnitedStates_Const, , geoImportAccessQuery)


This works if the database I am using is an .mdb However, if I make the
database an .mde, I get the following error when at the Set object line of
code:

Error number - 4007
Error Description - Cannot connect with the specified DataSourceMoniker.

The only thing that changes is the file extension on the current
database---> .mdb to .mde

Why? Does the ImportData method not work with .mde files? If not, what
will work with .mde files?

Thanks,
 

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