Hi.
i have several ms access 2007 databases currently used by many users. i like to have a vbs to list all the object in each database. i had an old script that listed objects from access 97. but, it's not working on access 2007. i modified it to access the sys objects, but it says no permission to read the sys objects.
any ideas?
thanks much.
here's the code:
i have several ms access 2007 databases currently used by many users. i like to have a vbs to list all the object in each database. i had an old script that listed objects from access 97. but, it's not working on access 2007. i modified it to access the sys objects, but it says no permission to read the sys objects.
any ideas?
thanks much.
here's the code:
Code:
db_path = "C:\Documents and Settings\a032299\Desktop\AMORTIZE.MDB"
db_file = db_path
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
objConnection.Open _
"Provider = Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = " & db_path
commandstring = "SELECT MSysObjects.Name FROM MsysObjects WHERE " & _
"(MSysObjects.Type)=1;"
objRecordSet.Open commandstring, objConnection
if not objRecordSet.EOF then
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
tbl_name = objRecordset.Fields.Item("name")
objRecordSet.MoveNext
msg = msg & tbl_name & vbcrlf
Loop
end if
msgbox msg
objRecordSet.Close