[python-win32] driving MS Access from python

Phill Atwood me at phillatwood.name
Sun Mar 12 23:19:01 CET 2006



Need to programatically reproduce some activities a user does in MS Access.
Need to open a mdb file.  Run some queries.  Look at some tables.

So far

import win32com.client
a = win32com.client.Dispatch("Access.Application")
a.Visible = 1
db = a.OpenCurrentDatabase(filename)

Which seems to work so far.  But now I need to run 2 of 3 named 
queries.  Then switch
to the Tables view and collect the info that has now populated the 
tables and extract them
into python code.  I having a hard time scaring up appropriate docs on 
the MS Access
win32com API for this.  I've been looking for VBA style docs or anything 
but I'm still so
far just sniffing the corners...

Any help is appreciated.

Phill



More information about the Python-win32 mailing list