turtlemaster
Programmer
I have a database that I am gogin to split up into a front end back end application. I am writing the module to refresh the links the darn thing wont let me change the connect property on my table defs!! I've done this before in Access 97 but not 2000 -- what am doing I wrong? I checked out other source on the net and I am doing what it said to do but I must be missing something. This is my code (i've striiped it right down to try and find the problem. It runs but nothing happens. The Connect property isn't read only it doesn't even generate any errors just doesn't change the property.
Dim i As Integer
For i = 0 To CurrentDb.TableDefs.Count - 1
If Not CurrentDb.TableDefs(i).Connect = "" Then
CurrentDb.TableDefs(i).Connect = "MS Access;DATABASE=" & txtPath & ";PWD=" & txtPassword
CurrentDb.TableDefs(i).RefreshLink
End If
Next i
Dim i As Integer
For i = 0 To CurrentDb.TableDefs.Count - 1
If Not CurrentDb.TableDefs(i).Connect = "" Then
CurrentDb.TableDefs(i).Connect = "MS Access;DATABASE=" & txtPath & ";PWD=" & txtPassword
CurrentDb.TableDefs(i).RefreshLink
End If
Next i