A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Access transfer to Excel



 
 
Thread Tools Display Modes
  #1  
Old June 28th 06, 07:17 PM posted to microsoft.public.excel.programming
Deb Pingel[_2_]
external usenet poster
 
Posts: 1
Default Access transfer to Excel


When trying to transfer data from a Database on one drive to an Exce
Spreadsheet on a different drive in our system, the transfer i
creating a new tab in the destination spreadsheet. We want th
information to overwrite the info on the old worksheet every time th
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

--
Deb Pinge
-----------------------------------------------------------------------
Deb Pingel's Profile: http://www.excelforum.com/member.php...fo&userid=2011
View this thread: http://www.excelforum.com/showthread.php?threadid=55660

  #2  
Old June 28th 06, 08:19 PM posted to microsoft.public.excel.programming
JonR
external usenet poster
 
Posts: 82
Default Access transfer to Excel

Sounds like you're exporting from Access to Excel.

Try putting your data into a table in Access with either an Append, Update,
or Make-Table query, then in Excel use Data-> Get External Data->New Database
Query to link to the data table your database. When you need to refresh the
spreadsheet, click the Refesh Data button on the External Data toolbox (or
Refresh All if you've set up multiple queries in this fashion).

Obviously, you'll have to run the Access query first to get fresh data into
the table, and the Access database must be closed before you try to refresh
the spreadsheet, or you'll get some strange error messages.

Alternatively, you can set up your Excel spreadhseet as a linked table in
your Access database, so when Access updates or appends data, it will also be
refreshed in Excel. This is a bit trickier.

HTH

"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.
>
>
> --
> Deb Pingel
> ------------------------------------------------------------------------
> Deb Pingel's Profile: http://www.excelforum.com/member.php...o&userid=20119
> View this thread: http://www.excelforum.com/showthread...hreadid=556602
>
>

  #3  
Old June 28th 06, 10:02 PM posted to microsoft.public.excel.programming
Orne
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
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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 10:44 AM.


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