.ldb extension when file transferred

D

dab1477

Thanks in advance for the assist.
I've posted in Coding, but I think I should be in this forum. Here goes:

I have successfully assigned a macro using the TransferSpreadsheet command
to a command button. This successfully exports a query to a specified server
location as Filename.ldb. When I attempt to open with Excel, I get the
following error message:

Filename.ldb cannot be accessed. The file may be read-only, or you may be
trying to access a read-only location. Or, the server the document is stored
on may not be responding.

I have verified that the file is NOT read-only and can be accessed by
opening and saving other Excel files to the same path. I verified that the
server is responding by opening files within the same path.

How do I open a .ldb file with Excel or use TransferSpreadsheet
successfully. I'm 75% there. Just need to open the file!
Thanks again.
 
J

Jeanette Cunningham

Hi,
when I want to export access data to excel, I use .xls as the file
extension.
..ldb as a file extension is the locking file when an access database is
open.

Here is an example:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"Customers70000Rows", _
"C:\Temp\Test.xls", True

Jeanette Cunningham
 
S

Steve Schapel

Yes, Dab, I agree with Jeanette. And the same would apply in the case
of a macro... normally your filename would be .xls. Do you have any
particular reason why you want the file named with an .ldb extension?
 
D

dab1477

I use .xls as the extension to the file named within my path. The "system"
provided the .ldb extension. I have sinced altered my code/macro to use
Outputto and this seems to work. Still exploring what I did wrong. Thanks for
all your help. I'm learning more every time I use the forum. Thank you.
 

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