By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

Exporting result of a query to a db3 format?

P: n/a
Hi All,

I have an access query which retrieves some record. I can export the results
of it as an excel document, using the function TransferText. What I actually
need is to export the query as a db3 table. I've been suggested that once I
export it to an Excel file, the user has to open the document and to save it
as dbase III (.dbf) file
I expect I should be able to do this operation by code, using VBA.

Any suggestions appreciated

Regards,
Nicolae
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Nicolae Fieraru" wrote
What I actually need is to export the
query as a db3 table.


Instead of TransferText, you will use TransferDatabase.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2

P: n/a
rkc

"Nicolae Fieraru" <no****@please.cxm> wrote in message
news:40********@duster.adelaide.on.net...
Hi All,

I have an access query which retrieves some record. I can export the results of it as an excel document, using the function TransferText. What I actually need is to export the query as a db3 table. I've been suggested that once I export it to an Excel file, the user has to open the document and to save it as dbase III (.dbf) file
I expect I should be able to do this operation by code, using VBA.


You can export from a table or saved query to many formats using SQL.
The format for the query is

SELECT * INTO [dBase III;DATABASE=C:\].[customer] FROM [Customers]

dBase III is the export file type.
C:\ is the full path to the folder to be exported to.
customer is the file name minus the .extention
Customers is the name of the table or saved query.



Nov 13 '05 #3

P: n/a
Dear Larry,

Thank you for your reply. I tried to run this command, but I am not sure if
I have all the arguments right.
I want to export the results of the query named "ClientRecordQuery" into the
database "ClientRecordDBF.dbf" in the same folder as the Access application.
If my Access application is called "Access DB.mdb" (I am not sure if I have
to provide the application name somewhere.

Here is the command I put together:

DoCmd.TransferDatabase acExport, "dBase III", , acQuery,
"ClientRecordQuery", "ClientRecordDBF", 0, 0

I get the error: invalid argument. It would be nice if they actually
specified which arguments are bad...

Regards,
Nicolae

"Larry Linson" <bo*****@localhost.not> wrote in message
news:eq*****************@nwrddc03.gnilink.net...
"Nicolae Fieraru" wrote
> What I actually need is to export the
> query as a db3 table.


Instead of TransferText, you will use TransferDatabase.

Larry Linson
Microsoft Access MVP

Nov 13 '05 #4

P: n/a
Hi,

Thank you very much, this solution seems very easy to implement, however I
run into some problems, due to the design of the database (backend
application on a different server, and meantime somebody changed the mapped
address). It took me a while to discover the problem. I will test it soon

Regards,
Nicolae

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:rr*******************@twister.nyroc.rr.com...

"Nicolae Fieraru" <no****@please.cxm> wrote in message
news:40********@duster.adelaide.on.net...
Hi All,

I have an access query which retrieves some record. I can export the results
of it as an excel document, using the function TransferText. What I

actually
need is to export the query as a db3 table. I've been suggested that

once I
export it to an Excel file, the user has to open the document and to
save it
as dbase III (.dbf) file
I expect I should be able to do this operation by code, using VBA.


You can export from a table or saved query to many formats using SQL.
The format for the query is

SELECT * INTO [dBase III;DATABASE=C:\].[customer] FROM [Customers]

dBase III is the export file type.
C:\ is the full path to the folder to be exported to.
customer is the file name minus the .extention
Customers is the name of the table or saved query.



Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.