TIP: Click on subject to list as thread! ANSI
echo: win_access
to: THOM KIRBY
from: KEITH SAYERS
date: 1997-02-02 01:26:00
subject: Linking Excel To Access

       I have just been struggling with this problem!  It seems to be not
possible to 'hot-link' into and out of Access, as you can, say, between Excel
and Word.  I am surprised to find that - and would be delighted to be shown
wrong - but it seems to be so.  However we did develop a workaround :
       1. Create a Make Table query to gather the data you want in Excel.  I
suggest giving it a distinctive name based on the original table.  We used X_
as a prefix, which had the incidental benefit of pushing it down to the 
ottom
of the tables list, away from casual view.  Thus if your original table was
Prices, your make table becomes X_Prices.
       2. Write a macro to transfer the data to Excel.  This macro will need
three actions :
   OpenTable, with the arguments : Table Name   X_Prices
                                   View         Datasheet
                                   Data Mode    Read Only
   OutputTo, with the arguments  : Object Type  Table
                                   Object Name  X_Prices
                                   Output Format MicrosoftExcel(*.xls)
                                   Output File  PRICES.XLS
                                   Auto Start   No
   Close, with the arguments :     Object Type  Table
                                   Object Name  X_Prices
    (Include a full path in Output File, if you wish)
    Run the macro
      3. Exit to Excel, open the spreadsheet in which you want the data to
appear, in a second window open PRICES.XLS, and hot link into the former from
the latter.  Now close PRICES.XLS and leave it closed.
      This will provide a 'through route' from source to destination.  When
data changes in the Access database, run the Make Table query, run the Macro,
then open the Excel spreadsheet and update links.
      All right, kludgy, but it does work!  Although reading through what I
have just typed I can see two further improvements - probably the OpenTable
and Close actions could be removed and replaced with one to run the query.
Maybe I'll try that when I get time.
... If we learn from our mistakes, I'm about due for my PhD.
--- GEcho 1.12/beta+
---------------
* Origin: The InterACTive BBS - Canberra ACT - (06) 253-4933 (3:620/243)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.