Link a new table by VBA



Hi All,

I've looked for a long time and can't find any threads that help - maybe i'm
not using the correct terminology!

What i'm trying to do:
I'm trying to prompt a user to link a table.

Background:
Every month data is downloaded from an ODBC database - we use this "freeze"
for reporting for the whole month, then next month i need to relink the table.
.. problem is the table for next month is called something else.

My Strategy:
step 1) I was going to delete the outdated linked table with;
DoCmd.DeleteObject acTable, "MyLinkedTable"

step 2) Then open the link table dialogue box (you know when you hit RMB and
click "link tables..." NOT the link table manager!) to prompt the user for
the new linked table (stuck here).

step 3) Rename the newly linked table "MyLinkedTable" so all my queries and
forms and VBA work.

If you have any better ideas - i'm ready to listen! I've looked throught
http://www.mvps.org/access/tables/tbl0009.htm and the other pages that are
regularly recommended but they seem overly complicated for my simple purposes
and it looks like i need to know what the table is called in advance... i
need the user to browse for it.

Many thanks for reading hope you can help!!!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200702/1

.



Relevant Pages

  • Re: Install wont recognise second CD
    ... > I'm trying to install Sarge and everything is fine until I'm asked for the second CD. ... and the prompt to insert second disk simply reappears. ... Or maybe it was just reporting that there was no CD present. ...
    (Debian-User)
  • Re: China Travel Discussion List
    ... received a prompt answer that the wrongdoer's account had been deleted. ... And no doubt the spammer opened another free account within a few ... develop your own filtering system to try to minimise the amount that ... Reporting it is a complete waste of time. ...
    (rec.travel.asia)
  • Re: Help explain how relinking code works...
    ... it is catering for the case where different tables are linked to different ... Then it would have to prompt you table by table. ... > relink my backend tables if they are moved or renamed. ... > I move the backend MDB to a new directory. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Table linking problems - Access 2002
    ... Make sure you have the "always prompt for new locations" checkbox marked. ... Don't try to relink all tables for multiple ... returns me to the finder dialog and won't change the link if I have all the ...
    (microsoft.public.access.externaldata)
  • Re: Help explain how relinking code works...
    ... > it is catering for the case where different tables are linked to different ... Then it would have to prompt you table by table. ... >> relink my backend tables if they are moved or renamed. ... >> I move the backend MDB to a new directory. ...
    (microsoft.public.access.modulesdaovba)

Loading