J
Jack Cannon
I am attempting to set the description of a table that
appears in the database window of an Access application.
(not to be confused with the description that appears
in the table properties dialog box when viewing a table
in design mode)
Normally this is a matter of typing in the desired text
after selecting the properties icon on the toolbar.
However I am attempting to load the desired text into
the description property via VBA code.
The following code works as long as there is some
text already in the description.
Dim dbs As Database
Set dbs = CurrentDb
dbs.TableDefs("MyTable").Properties
("Description") = "Text of my description"
However if there is no pre-existing text in the
description, I
get the following error when the third line of the above
code
is executed.
err.number = 3270
err.description = Property not found.
It seems as though the description property does not
exist unless it
is initialized somehow.
Does anyone know what is going on here and what has to be
done
to accomplish the objective?
Thanks much,
Jack Cannon
appears in the database window of an Access application.
(not to be confused with the description that appears
in the table properties dialog box when viewing a table
in design mode)
Normally this is a matter of typing in the desired text
after selecting the properties icon on the toolbar.
However I am attempting to load the desired text into
the description property via VBA code.
The following code works as long as there is some
text already in the description.
Dim dbs As Database
Set dbs = CurrentDb
dbs.TableDefs("MyTable").Properties
("Description") = "Text of my description"
However if there is no pre-existing text in the
description, I
get the following error when the third line of the above
code
is executed.
err.number = 3270
err.description = Property not found.
It seems as though the description property does not
exist unless it
is initialized somehow.
Does anyone know what is going on here and what has to be
done
to accomplish the objective?
Thanks much,
Jack Cannon