Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 01:00 AM
Nicolae Fieraru
Guest
 
Posts: n/a
Default 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


  #2  
Old November 13th, 2005, 01:00 AM
Larry Linson
Guest
 
Posts: n/a
Default Re: Exporting result of a query to a db3 format?

"Nicolae Fieraru" wrote
[color=blue]
> What I actually need is to export the
> query as a db3 table.[/color]

Instead of TransferText, you will use TransferDatabase.

Larry Linson
Microsoft Access MVP


  #3  
Old November 13th, 2005, 01:00 AM
rkc
Guest
 
Posts: n/a
Default Re: Exporting result of a query to a db3 format?


"Nicolae Fieraru" <nospam@please.cxm> wrote in message
news:40d62143$1@duster.adelaide.on.net...[color=blue]
> Hi All,
>
> I have an access query which retrieves some record. I can export the[/color]
results[color=blue]
> of it as an excel document, using the function TransferText. What I[/color]
actually[color=blue]
> need is to export the query as a db3 table. I've been suggested that once[/color]
I[color=blue]
> export it to an Excel file, the user has to open the document and to save[/color]
it[color=blue]
> as dbase III (.dbf) file
> I expect I should be able to do this operation by code, using VBA.[/color]

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.









  #4  
Old November 13th, 2005, 01:00 AM
Nicolae Fieraru
Guest
 
Posts: n/a
Default Re: Exporting result of a query to a db3 format?

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" <bouncer@localhost.not> wrote in message
news:eqrBc.7478$mG4.5887@nwrddc03.gnilink.net...[color=blue]
> "Nicolae Fieraru" wrote
>[color=green]
> > What I actually need is to export the
> > query as a db3 table.[/color]
>
> Instead of TransferText, you will use TransferDatabase.
>
> Larry Linson
> Microsoft Access MVP
>
>[/color]


  #5  
Old November 13th, 2005, 01:00 AM
Nicolae Fieraru
Guest
 
Posts: n/a
Default Re: Exporting result of a query to a db3 format?

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" <rkc@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:rrrBc.102927$j24.5709@twister.nyroc.rr.com...[color=blue]
>
> "Nicolae Fieraru" <nospam@please.cxm> wrote in message
> news:40d62143$1@duster.adelaide.on.net...[color=green]
> > Hi All,
> >
> > I have an access query which retrieves some record. I can export the[/color]
> results[color=green]
> > of it as an excel document, using the function TransferText. What I[/color]
> actually[color=green]
> > need is to export the query as a db3 table. I've been suggested that[/color][/color]
once[color=blue]
> I[color=green]
> > export it to an Excel file, the user has to open the document and to[/color][/color]
save[color=blue]
> it[color=green]
> > as dbase III (.dbf) file
> > I expect I should be able to do this operation by code, using VBA.[/color]
>
> 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.
>
>
>
>
>
>
>
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles