After learning that the 'subdatasheet name' property set to "[Auto]"
can adversely effect database speed, I wanted to send a small code
snippent to my end users to reset the SubdatasheetName Property so they
don't have to manually cycle through 35 or 40 tables and change the
property. VBA help says: "To set the SubdatasheetName property by using
Visual Basic, you must first either:
-Set the property in table Design view by pointing to Properties on the
View menu.
-Create the property by using the DAO CreateProperty method."
I tried but can't figure out how to do either. Why should I need to
create a property if it already exists? I saved myself some clicks by
running:
Public Sub rmvSubDataSheetName()
Dim db As Database
Dim tbl As TableDef
Dim tdfLoop As TableDef
Dim intContinue As Integer
Set db = CurrentDb()
With db
For Each tbl In .TableDefs
DoCmd.OpenTable tbl.Name, acViewDesign
DoCmd.SelectObject acTable, tbl.Name
DoCmd.RunCommand acCmdProperties
--------THIS IS WHERE I AM STUCK I END UP CLICKING WITH THE MOUSE
Next tbl
End With
End Sub
I want to change the property "subdatasheetname" to "[None]" but I
can't figure out how. Any suggestions?
Thanks.