472,096 Members | 1,109 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

Exporting result of a query to a db3 format?

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
4 5126
"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
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
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
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.

Similar topics

3 posts views Thread by Fran Zablocki | last post: by
1 post views Thread by Big Time | last post: by
2 posts views Thread by Mustufa Baig | last post: by
1 post views Thread by Mustufa Baig | last post: by
reply views Thread by =?Utf-8?B?ZGVuIDIwMDU=?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.