LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Access transfer to Excel


Deb Pingel wrote:
When trying to transfer data from a Database on one drive to an Excel
Spreadsheet on a different drive in our system, the transfer is
creating a new tab in the destination spreadsheet. We want the
information to overwrite the info on the old worksheet every time the
macro is run. Since the worksheet (tab) does not have the correct name,
our formulas won't work. What is causing this and how do we correct it?
This works when set up within the same drive.


Sounds like you have something wrong in the Path of the ODBC connection
that's linking Access to Excel.

An alternative: create a QueryTable object (Excel - Data Menu -
Import External Data - Import Data ) and create an ODBC connection to
the Access database. In the QueryTable Object, set the RefreshStyle
property to xlOverwriteCells.

Another alternative: Open a RecordSet of your data in Access. From
Access, create an "Excel.Application" object, and open the workbook
that you are writing the data to. Then use the Range.CopyFromRecordset
method to copy the data into the Excel sheet (remember do do a
Range().ClearContents first to get rid of old data)

 
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
Transfer data from Excel to Access Secret Squirrel Excel Discussion (Misc queries) 1 March 27th 06 12:07 AM
ADO Transfer from Excel to Access Secret Squirrel Excel Discussion (Misc queries) 0 March 26th 06 11:50 PM
Transfer data from Excel to Access SecretSquirrel Excel Programming 0 March 25th 06 07:13 PM
Transfer Excel Worksheet to Access FGM Excel Programming 0 October 31st 05 04:01 PM
Transfer of data from excel to access Chris B.[_2_] Excel Programming 0 December 9th 03 12:30 PM


All times are GMT +1. The time now is 06:36 PM.

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

About Us

"It's about Microsoft Excel"