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 |