NewProgrammer1234
Programmer
I need to run a function on a linked table and I am not sure how to define MyTable as a linked table. I am new to Access VB and my Access help files are corrupt so i am in a bit of a bind. My code gives me an error at the "Set MyTable= . . ." I know I need to define MyTable as a linked table but I don't know how. Any help would be greatly appreciated.
Dim MyDB As Database, MyTable As Recordset
Dim AI_code As Long, Count_changes As Long, AI_code_variant As Variant
Set MyDB = DBEngine.Workspaces(0).Databases(0)
Set MyTable = MyDB.OpenRecordset(Table_name, DB_OPEN_TABLE)
Dim MyDB As Database, MyTable As Recordset
Dim AI_code As Long, Count_changes As Long, AI_code_variant As Variant
Set MyDB = DBEngine.Workspaces(0).Databases(0)
Set MyTable = MyDB.OpenRecordset(Table_name, DB_OPEN_TABLE)