Can i rename a field in a remote DB ? I have a delete function to delete the field, but since the field is a part of a connection
i cannot delete it.However renaming the field from ContactID to CustomerID will do the job for me.
Below is my delete function.I will be grateful if somebody help me rebuilding it to a rename function only.:
Dim wsp As DAO.Workspace
Dim StrPassword As String
StrPassword = “password”
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set wsp = DAO.DBEngine.Workspaces(0)
Dim dbs As DAO.Database
Set dbs = wsp.OpenDatabase(“C:BEstoreBE.mdb”, False, False,
“;PWD=” & StrPassword)
Set tdf = dbs.TableDefs(“CallsCustomers”)
Set fld = tdf.Fields(“ContactID”)
tdf.Fields.Delete fld.Name
tdf.Fields.Refresh
dbs.Close
Set fld = Nothing
Set tdf = Nothing
Set dbs = Nothing
Set wsp = Nothing
End Sub