dbTalk Databases Forums  

Creating and Modifying tables in a remote database

comp.database.ms-access comp.database.ms-access


Discuss Creating and Modifying tables in a remote database in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
RWC
 
Posts: n/a

Default Creating and Modifying tables in a remote database - 01-10-2004 , 05:17 PM






Hello,

I'm trying to do some updates on the fly in a remote database. I'd like to
do this with code. I'm running basically the following code;

Dim db As Database
Dim tblDefs As TableDefs
Dim tblDef As TableDef
Dim strCurrentDatabase As String

strCurrentDatabase = GetDatabase("desktop", "Find Database") 'Get Database
opens dialog box to locate the database

Set db = OpenDatabase(strCurrentDatabase)

For Each tblDef In db.TableDefs

DoCmd.Rename "TMP" & tblDef.Name, acTable, tblDef.Name

Next tblDef

This doesn't seem to work though, it's trying to rename the local link name,
if a link exists of the same name. Outside of just renaming a table out of
the way, I'd like to be able to add fields or modify field properties. Any
help would be appreciated. I'm using Access XP with SP2 installed on a
Windows XP pro machine.

If you reply to this posting via email, please remove the caps and
underscores.

Thanks in advance!
Rick





Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.