Hi,
I have search this site but nothing comes close to what I needed.
Below is the closest code I found.
Private Sub setTableDescription(strSourceFile As String, strTableName As String, strDescription As String)
Dim ws As New DAO.DBEngine
Dim db As DAO.Database
Dim tbl As DAO.TableDef
Dim prop As DAO.Property
Set db = ws.OpenDatabase(strSourceFile)
Set tbl = db.TableDefs(strTableName)
Set prop = tbl.Properties("Description")
prop.Value = strDescription
Set ws = Nothing
End Sub
But the code cannot find the “Order By” of the table properties.
To get I mean, open a table in design mode, right click on top of the design header, click the Properties. Under the “General” Tab, there is an “Order By” field.
I need to use the “Order By” to sort by Ascending automatically to a column.
I had tried ADO, still no luck.
Does anyone help?
I have search this site but nothing comes close to what I needed.
Below is the closest code I found.
Private Sub setTableDescription(strSourceFile As String, strTableName As String, strDescription As String)
Dim ws As New DAO.DBEngine
Dim db As DAO.Database
Dim tbl As DAO.TableDef
Dim prop As DAO.Property
Set db = ws.OpenDatabase(strSourceFile)
Set tbl = db.TableDefs(strTableName)
Set prop = tbl.Properties("Description")
prop.Value = strDescription
Set ws = Nothing
End Sub
But the code cannot find the “Order By” of the table properties.
To get I mean, open a table in design mode, right click on top of the design header, click the Properties. Under the “General” Tab, there is an “Order By” field.
I need to use the “Order By” to sort by Ascending automatically to a column.
I had tried ADO, still no luck.
Does anyone help?