If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Table Description using VBA
Does anyone know how to change the Table Description using VBA?
I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
#2
|
|||
|
|||
Table Description using VBA
I think that you may be wanting to do more with the table then you should ??
Dn't use the table for much more than storeing basic data - OK you can set some idexes, define field types, etc. But in essence you should not need to alter anything about the properties view vba Just use a table as an old fashion filing cabinet draw - it holds bits of info, to do anything with the info your need to take it out - or in this case you need a form or a query, report, module, etc -- Wayne Manchester, England. "Gary Brown" wrote: Does anyone know how to change the Table Description using VBA? I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
#3
|
|||
|
|||
Table Description using VBA
Thanks for the quick reply, Wayne.
In my current project, I'm creating a table on the fly and want to add a description for documentation purposes so others besides myself will know what the table's about. Sincerely, Gary Brown "Wayne-I-M" wrote: I think that you may be wanting to do more with the table then you should ?? Dn't use the table for much more than storeing basic data - OK you can set some idexes, define field types, etc. But in essence you should not need to alter anything about the properties view vba Just use a table as an old fashion filing cabinet draw - it holds bits of info, to do anything with the info your need to take it out - or in this case you need a form or a query, report, module, etc -- Wayne Manchester, England. "Gary Brown" wrote: Does anyone know how to change the Table Description using VBA? I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
#4
|
|||
|
|||
Table Description using VBA
Why not just (as you say) use the table propertes ?
Is there some reason -- Wayne Manchester, England. "Gary Brown" wrote: Thanks for the quick reply, Wayne. In my current project, I'm creating a table on the fly and want to add a description for documentation purposes so others besides myself will know what the table's about. Sincerely, Gary Brown "Wayne-I-M" wrote: I think that you may be wanting to do more with the table then you should ?? Dn't use the table for much more than storeing basic data - OK you can set some idexes, define field types, etc. But in essence you should not need to alter anything about the properties view vba Just use a table as an old fashion filing cabinet draw - it holds bits of info, to do anything with the info your need to take it out - or in this case you need a form or a query, report, module, etc -- Wayne Manchester, England. "Gary Brown" wrote: Does anyone know how to change the Table Description using VBA? I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
#5
|
|||
|
|||
Table Description using VBA
db.TableDefs(TableName).Properties("Description") = Description
Exactly what I was looking for! Have a great weekend. Off to celebrate Independence Day! -- Gary Brown "Wayne-I-M" wrote: Why not just (as you say) use the table propertes ? Is there some reason -- Wayne Manchester, England. "Gary Brown" wrote: Thanks for the quick reply, Wayne. In my current project, I'm creating a table on the fly and want to add a description for documentation purposes so others besides myself will know what the table's about. Sincerely, Gary Brown "Wayne-I-M" wrote: I think that you may be wanting to do more with the table then you should ?? Dn't use the table for much more than storeing basic data - OK you can set some idexes, define field types, etc. But in essence you should not need to alter anything about the properties view vba Just use a table as an old fashion filing cabinet draw - it holds bits of info, to do anything with the info your need to take it out - or in this case you need a form or a query, report, module, etc -- Wayne Manchester, England. "Gary Brown" wrote: Does anyone know how to change the Table Description using VBA? I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
#6
|
|||
|
|||
Table Description using VBA
Just tested this and I can't get it work with VBA but it works fine with DAO.
But it took me 10 min to write some code in a public module to do what woud have taken a few seconds in the properties box - whats the point. Oh well up to you. Use DAO and you'll get it to work - but still think it not worth it ;-) -- Wayne Manchester, England. "Gary Brown" wrote: Thanks for the quick reply, Wayne. In my current project, I'm creating a table on the fly and want to add a description for documentation purposes so others besides myself will know what the table's about. Sincerely, Gary Brown "Wayne-I-M" wrote: I think that you may be wanting to do more with the table then you should ?? Dn't use the table for much more than storeing basic data - OK you can set some idexes, define field types, etc. But in essence you should not need to alter anything about the properties view vba Just use a table as an old fashion filing cabinet draw - it holds bits of info, to do anything with the info your need to take it out - or in this case you need a form or a query, report, module, etc -- Wayne Manchester, England. "Gary Brown" wrote: Does anyone know how to change the Table Description using VBA? I can do it manually by right-clicking on a table, selecting 'Properties' and typing in a description but I'd like to do that via code. Any help would be greatly appreciated. -- Thanks in advance for your feedback. Sincerely, Gary Brown |
Thread Tools | |
Display Modes | |
|
|