<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=877091921-10042003><FONT face="Comic Sans MS" color=#0000ff
size=2>All you have to do is create the table and set its connect string and
sourcetable name, then append it to the TableDefs collection. You don't
set attributes.</FONT></SPAN></DIV>
<DIV><SPAN class=877091921-10042003><FONT face="Comic Sans MS" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877091921-10042003><FONT face="Comic Sans MS" color=#0000ff
size=2>Charlotte Foust</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Don Elliker
[mailto:delliker@hotmail.com] <BR><B>Sent:</B> Thursday, April 10, 2003 9:04
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD]
Linking to various dbs through DAO /Access2k<BR><BR></FONT></DIV>
<DIV>
<DIV>
<P>I am trying to get linked to a selected database through code. I get a
failure on the append. The very informative 3251 "Operation is not supported
for this type of object". I need to delete all the attached tables and relink
to new ones.</P>
<P>I am doing this: db_Be is the new database I want to link to. dbcur is the
front end I am running code from.</P>
<P>Thanks, and How's everybody been?(don't answer that you'll kill my hotmail
account)</P>
<P>_D</P>
<P>For intI = 0 To db_BE.TableDefs.Count -
1<BR> Set
TdfBE =
db_BE.TableDefs(intI)<BR>
SysCmd acSysCmdUpdateMeter,
intI<BR>
If Not TdfBE.Name Like "msys*"
Then<BR>
Set tdfNew =
dbCur.CreateTableDef()<BR>
With
tdfNew<BR>
.Name = "newtable" &
intI<BR>
'.Attribu! tes =
dbAttachedTable<BR>
.SourceTableName =
TdfBE.Name<BR>
.Connect = "MS Access;DATABASE=" &
strDBName<BR>
End
With<BR>
'dbCur.TableDefs.Append
(tdfNew)<BR>
<BR>
dbCur.TableDefs.Append
(tdfNew)<BR> !
End
If<BR> Next
intI<BR><BR></P></DIV></DIV><BR clear=all>
<HR>
Tired of spam? Get <A href="http://g.msn.com/8HMJENUS/2734">advanced junk mail
protection</A> with MSN 8. </BLOCKQUOTE></BODY></HTML>