BradCollins
Technical User
This is (to me) a real strange problem.
Firstly I have a database coded to relink some tables on starting, it works without an issue.
Now I am creating a new database and would like to use the same process, so of course I copied the code form the original working database to the new one and now I get the error "3170 could not find installable isam" when I run it.
For the life of me I cannot see what has changed, I have added all of the identical references in the editor but yet I still cant get this to work. Any ideas or help would be most appreciated. The code I am using is below.
Thanks
Firstly I have a database coded to relink some tables on starting, it works without an issue.
Now I am creating a new database and would like to use the same process, so of course I copied the code form the original working database to the new one and now I get the error "3170 could not find installable isam" when I run it.
For the life of me I cannot see what has changed, I have added all of the identical references in the editor but yet I still cant get this to work. Any ideas or help would be most appreciated. The code I am using is below.
Thanks
Code:
Dim varOldLocation As Variant
Dim varNewLocation As Variant
Dim varOldConnectionString As String
Dim varNewConnectionString As String
Dim ctl As Control
Dim db As Database
Dim TDF As TableDef
Dim frm As Form
varOldLocation = Me.txtFileNameOld.Value
varNewLocation = Me.txtFileNameNew.Value
varOldConnectionString = ";DATABASE=" & varOldLocation
varNewConnectionString = ";DATABASE=" & varNewLocation
Set frm = Forms!frmUpgrade
Set ctl = frm!PBarInitialise
Set db = CurrentDb
DoEvents
ctl.max = 100
ctl = 0
DoEvents
'relink all tables to supplied locations
Set TDF = db.TableDefs("tblCourses")
TDF.Connect = varOldLocation
TDF.RefreshLink
Debug.Print TDF.Connect
ctl = ctl + 10