from win32com.client import Dispatch
oAccess = Dispatch("Access.Application")
oAccess.Visible = False
oAccess.OpenCurrentDatabase(my_db)
oDB = oAccess.CurrentDB
for tbl in oDB.TableDefs:
print(table.Name)
tbl.RefreshLink
I've also done:
for tbl in oAccess.TableDefs:
print(table.Name)
tbl.RefreshLink
Error: 'function' object has no attribute 'TableDefs'
I'm starting to understand how to manipulate Windows using win32com, but for some reason it seems like ".TableDefs" isn't recognized. Am I going about it the wrong way?
I know this can be done in VBA. I've been tasked with switching everything over to Python.