From: iccsi on
I would like to know is it possible to create link table at run time?
If yes, any information is great appreciated,
From: Marshall Barton on
iccsi wrote:

>I would like to know is it possible to create link table at run time?
>If yes, any information is great appreciated,


Certainly, it is possible. All you have to do is create the
TableDef object (if it doesn;t already exist) and set its
Connect property.

Depending on what you are linking to, the linking
information that's needed in the Connect property can get
kind of complicated. To see what you need, first connect
manually as if you did not want to use code, Then use the
Immediate Window to see what Access did:
?CurrentDb.TableDefs![name of table].Connect

There is a modest amount of information about these things
in VBA Help.

--
Marsh
MVP [MS Access]
From: iccsi on
On Apr 16, 9:08 am, Marshall Barton <marshbar...(a)wowway.com> wrote:
> iccsi wrote:
> >I would like to know is it possible to create link table at run time?
> >If yes, any information is great appreciated,
>
> Certainly, it is possible.  All you have to do is create the
> TableDef object (if it doesn;t already exist) and set its
> Connect property.
>
> Depending on what you are linking to, the linking
> information that's needed in the Connect property can get
> kind of complicated.  To see what you need, first connect
> manually as if you did not want to use code,  Then use the
> Immediate Window to see what Access did:
>         ?CurrentDb.TableDefs![name of table].Connect
>
> There is a modest amount of information about these things
> in VBA Help.
>
> --
> Marsh
> MVP [MS Access]

Thanks millions,