Hi,
I've got a question about exporting data from an access database. I'm using Access 2000 on windows 2000.
I'm using the following VBA in my database:
Dim name As String
name = "C:\Data\export"
DoCmd.TransferSpreadsheet acExport, , "Q_export",name
So I'm exporting the content of query "Q_export" to the file "C:\Data\export". But I would like to keep the path that I'm exporting the file to variable. I would like to export to the directory where the database is in (so the current directory). I guess that there is some kind of a VBA-code that contains the name of the directory of the current database. So something like:
name = Current Directory & "\export"
Do you know if this is possible with VBA-code?
Thanks again for your help!
Regards,
Robert
I've got a question about exporting data from an access database. I'm using Access 2000 on windows 2000.
I'm using the following VBA in my database:
Dim name As String
name = "C:\Data\export"
DoCmd.TransferSpreadsheet acExport, , "Q_export",name
So I'm exporting the content of query "Q_export" to the file "C:\Data\export". But I would like to keep the path that I'm exporting the file to variable. I would like to export to the directory where the database is in (so the current directory). I guess that there is some kind of a VBA-code that contains the name of the directory of the current database. So something like:
name = Current Directory & "\export"
Do you know if this is possible with VBA-code?
Thanks again for your help!
Regards,
Robert