Dan Waters
dwaters at usinternet.com
Sat Nov 20 11:43:34 CST 2004
Happy Thanksgiving to everyone!
I want to write a utility sub to change the SubDatasheetName property in
tables to [None]. I'm trying to use the code below, but get an error of
'The object is closed or does not exist' at the code line beginning Set
prp =. The table is open and in Design view.
Dim obj As AccessObject
Dim prp As DAO.Property
Dim stgName As String
For Each obj In CurrentData.AllTables
stgName = obj.Name
DoCmd.OpenTable stgName, acViewDesign, acEdit
Set prp = obj.CreateProperty("SubDatasheetName", dbText,
"[None]")
DoCmd.Close acTable, stgName, acSaveYes
Next
Can this be done?
Thanks,
Dan Waters
ProMation Systems, Inc.