Programatically setting "Description" of ADP forms

  • Thread starter Brian J. Parker
  • Start date
B

Brian J. Parker

When you right-click a form in Access, you can set a "Description" that will
appear next to the form in Details view. This is persistent (it stays there
if you close and re-open Access).

I would like to be able to set that "Description" programatically. Thanks
to Appendix C of the Access 2000 Developer's Handbook (Getz/Litwin/Gilbert),
I know that I could use DAO in an MDB to do so. However, with an ADP, the
DAO technique does not work. Does anyone know whether that property is
exposed and writeable somewhere?

Thanks in advance for any assistance.

Regards,
Brian Parker
 
I

Igor V. Makeev

Hello, Brian!
You wrote in message on Thu, 8 Jul 2004 09:40:31 -0400:

BJP> However, with an ADP, the DAO technique does not work. Does anyone
BJP> know whether that property is exposed and writeable somewhere?

CurrentProject.AllForms("FormName").Properties("Description") = "..."

With best regards, Igor.
ICQ: 111469481
 
B

Brian J. Parker

Igor V. Makeev said:
BJP> However, with an ADP, the DAO technique does not work. Does anyone
BJP> know whether that property is exposed and writeable somewhere?

CurrentProject.AllForms("FormName").Properties("Description") = "..."

Thank you for the reply. I had tried this, and it didn't work.

But based on your encouragement, I did some more experimentation, and found
that it will work in an ADP *IF* the form already has a Description. It's
as if the form does not have a Description property until you set it via the
GUI; then it is exposed and can be changed.

So I was closer, but I would like to be able to initially set that
Description in code. So I experimented a little more. It turns out that
the following syntax seems to ALWAYS work:

CurrentProject.AllForms("FormName").Properties.Add "Description", "..."

....whether there is an existing Description or not. (The same technique
should work for AllReports and AllModules, too.)

Thanks for your help,
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top