Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Export of select query data to excel in Access 2007

Hello,



to export the select query data to excel file in VBA code you can use
DoCmd.OutputTo or DoCmd.TransferSpreadShet method. Ok, you can use both
types as a macro action too.



In my applications I'm using both versions. In one of my programs I have to
transfer the data every night to the same excel file. Because of the fact
that the file of the fixed name has been existing from the previous night
Access program always notices me about that and asks me to overwrite the
file. I don't find any argument (parameter) in either of methods to demand
default overwriting. I want to avoid to click all the times, so I want to
automate the overwriting. Is there really the only solution to delete the
excel file first and only then export the query data to the file, which will
be new created? Or did I overlook any fact?



Ivan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Export of select query data to excel in Access 2007

I don't speak the Access, but doesn't its flavor of VBA support the Kill
command.

In excel's flavor of VBA, I'd either use Kill (to delete the existing file
first) or

application.displayalerts = false
'do the save
application.displayalerts = true

If this doesn't help and you don't get a good answer here, I'd ask in a forum
dedicated to Access.

Ivan wrote:

Hello,

to export the select query data to excel file in VBA code you can use
DoCmd.OutputTo or DoCmd.TransferSpreadShet method. Ok, you can use both
types as a macro action too.

In my applications I'm using both versions. In one of my programs I have to
transfer the data every night to the same excel file. Because of the fact
that the file of the fixed name has been existing from the previous night
Access program always notices me about that and asks me to overwrite the
file. I don't find any argument (parameter) in either of methods to demand
default overwriting. I want to avoid to click all the times, so I want to
automate the overwriting. Is there really the only solution to delete the
excel file first and only then export the query data to the file, which will
be new created? Or did I overlook any fact?

Ivan


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Export of select query data to excel in Access 2007

I woul like to excuse myself. I have been noticed that I sent my question to
wrong group (my fingers were too fast), but it was to late and I couln't
erase my post later anymore. The same question is now in an access group
too.

And thank you for your help, Dave.

Ivan

"Dave Peterson" wrote in message
...
I don't speak the Access, but doesn't its flavor of VBA support the Kill
command.

In excel's flavor of VBA, I'd either use Kill (to delete the existing file
first) or

application.displayalerts = false
'do the save
application.displayalerts = true

If this doesn't help and you don't get a good answer here, I'd ask in a
forum
dedicated to Access.

Ivan wrote:

Hello,

to export the select query data to excel file in VBA code you can use
DoCmd.OutputTo or DoCmd.TransferSpreadShet method. Ok, you can use both
types as a macro action too.

In my applications I'm using both versions. In one of my programs I have
to
transfer the data every night to the same excel file. Because of the fact
that the file of the fixed name has been existing from the previous night
Access program always notices me about that and asks me to overwrite the
file. I don't find any argument (parameter) in either of methods to
demand
default overwriting. I want to avoid to click all the times, so I want to
automate the overwriting. Is there really the only solution to delete
the
excel file first and only then export the query data to the file, which
will
be new created? Or did I overlook any fact?

Ivan


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Export of select query data to excel in Access 2007

Did you look in Access's VBA's help for Kill?

I bet it's there.

Ivan wrote:

I woul like to excuse myself. I have been noticed that I sent my question to
wrong group (my fingers were too fast), but it was to late and I couln't
erase my post later anymore. The same question is now in an access group
too.

And thank you for your help, Dave.

Ivan

"Dave Peterson" wrote in message
...
I don't speak the Access, but doesn't its flavor of VBA support the Kill
command.

In excel's flavor of VBA, I'd either use Kill (to delete the existing file
first) or

application.displayalerts = false
'do the save
application.displayalerts = true

If this doesn't help and you don't get a good answer here, I'd ask in a
forum
dedicated to Access.

Ivan wrote:

Hello,

to export the select query data to excel file in VBA code you can use
DoCmd.OutputTo or DoCmd.TransferSpreadShet method. Ok, you can use both
types as a macro action too.

In my applications I'm using both versions. In one of my programs I have
to
transfer the data every night to the same excel file. Because of the fact
that the file of the fixed name has been existing from the previous night
Access program always notices me about that and asks me to overwrite the
file. I don't find any argument (parameter) in either of methods to
demand
default overwriting. I want to avoid to click all the times, so I want to
automate the overwriting. Is there really the only solution to delete
the
excel file first and only then export the query data to the file, which
will
be new created? Or did I overlook any fact?

Ivan


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Export of select query data to excel in Access 2007

Yes it is. A detail from Help:

Kill Statement

Deletes files from a disk.

Syntax

Kill pathname

--
Regards,
Ivan

"Dave Peterson" wrote in message
...
Did you look in Access's VBA's help for Kill?

I bet it's there.

Ivan wrote:

I woul like to excuse myself. I have been noticed that I sent my question
to
wrong group (my fingers were too fast), but it was to late and I couln't
erase my post later anymore. The same question is now in an access group
too.

And thank you for your help, Dave.

Ivan

"Dave Peterson" wrote in message
...
I don't speak the Access, but doesn't its flavor of VBA support the Kill
command.

In excel's flavor of VBA, I'd either use Kill (to delete the existing
file
first) or

application.displayalerts = false
'do the save
application.displayalerts = true

If this doesn't help and you don't get a good answer here, I'd ask in a
forum
dedicated to Access.

Ivan wrote:

Hello,

to export the select query data to excel file in VBA code you can use
DoCmd.OutputTo or DoCmd.TransferSpreadShet method. Ok, you can use
both
types as a macro action too.

In my applications I'm using both versions. In one of my programs I
have
to
transfer the data every night to the same excel file. Because of the
fact
that the file of the fixed name has been existing from the previous
night
Access program always notices me about that and asks me to overwrite
the
file. I don't find any argument (parameter) in either of methods to
demand
default overwriting. I want to avoid to click all the times, so I want
to
automate the overwriting. Is there really the only solution to delete
the
excel file first and only then export the query data to the file,
which
will
be new created? Or did I overlook any fact?

Ivan

--

Dave Peterson


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using MS Query with Excel and Access 2007 mipoit Excel Discussion (Misc queries) 3 May 5th 09 01:58 AM
Excel 2007 - Query MS Access DB James C. Excel Discussion (Misc queries) 0 February 19th 09 03:34 PM
Excel 2007 Query Wizard problem with Access 2007 extensions Showdad Excel Discussion (Misc queries) 0 December 4th 08 05:57 PM
Import Access query to Excel 2007 Office Productivity Consultant Excel Discussion (Misc queries) 8 November 14th 08 05:52 PM
Export to Access, Workbook Treated as a Query Response ConfusedNHouston Excel Discussion (Misc queries) 1 March 3rd 08 08:28 PM


All times are GMT +1. The time now is 11:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"