If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
MSysObjects permissions
I am attempting to get a list of table names from an Access database.
If I try to open this recordset: Set db = OpenDatabase("C:\DataFolder\Data.mdb) Set rs1 = db.OpenRecordset("Select Name, Type From MSysObjects WHERE Type = 1 AND FLAGS = 0 ORDER BY Name;") I get this message: Record(s) cannot be read; no read permission on 'MSysObjects' Can I do what I'm trying to do, or is there a better way? |
#2
|
|||
|
|||
MSysObjects permissions
Well, this may be a typo, but you don't have a closing quote in the
path/filename string: Set db = OpenDatabase("C:\DataFolder\Data.mdb) Assuming it's a typo, is C:\DataFolder\Data.mdb the current database? And if so, could you use CurrentDb? Set db= CurrentDb If C:\DataFolder\Data.mdb is an external database, could you link its MSysObject (calling MSysObjectsRemote) table and use CurrentDb and use MSysObjectsRemote in the query? -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L wrote in message ... I am attempting to get a list of table names from an Access database. If I try to open this recordset: Set db = OpenDatabase("C:\DataFolder\Data.mdb) Set rs1 = db.OpenRecordset("Select Name, Type From MSysObjects WHERE Type = 1 AND FLAGS = 0 ORDER BY Name;") I get this message: Record(s) cannot be read; no read permission on 'MSysObjects' Can I do what I'm trying to do, or is there a better way? |
#3
|
|||
|
|||
MSysObjects permissions
wrote:
I am attempting to get a list of table names from an Access database. Also view the TableDefs collection in VBA help. Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ Granite Fleet Manager http://www.granitefleet.com/ |
Thread Tools | |
Display Modes | |
|
|