Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Table Desciption

Status
Not open for further replies.

smdemo

Programmer
Sep 15, 2002
63
US
I'm a little stuck trying to write code to change a table's description. I found code like this very similar that works fine for renaming queries, but I am getting a 3420 error "Object invalid or no longer set". Can anyone help me out?

Dim prp As DAO.Property
Dim tdf As DAO.TableDef

Set tdf = CurrentDb.TableDefs("FlagGrouping")
Set prp = tdf.CreateProperty("Description", dbText, "My New Description")
tdf.Properties.Append prp

Thanks
Steve
 
I'd replace this:
Set tdf = CurrentDb.TableDefs("FlagGrouping")
with this:
Dim db As DAO.Database
Set db = CurrentDb
Set tdf = db.TableDefs("FlagGrouping")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top