Form description (1 Viewer)

drakopp

New member
Local time
Today, 04:56
Joined
Sep 29, 2017
Messages
9
I apologize in advance for my English.
Tell me, please, how to set a description for a form using vba?
 

Ranman256

Well-known member
Local time
Yesterday, 21:56
Joined
Apr 9, 2015
Messages
4,337
if in the form:
me.description = "new description"

from another form:
forms!fMyForm.description = "new description"

tho why would you need to in VB?
 

drakopp

New member
Local time
Today, 04:56
Joined
Sep 29, 2017
Messages
9
if in the form:
me.description = "new description"

from another form:
forms!fMyForm.description = "new description"

tho why would you need to in VB?
In MS Access, there is no such property for a form
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 21:56
Joined
Jan 23, 2006
Messages
15,380
Please tell us more of the context. If you maintain a database of your database objects, then I would expect a table with fields for ObjName, ObjType, ObjDescription.... that you would maintain.
You can use the built in feature by right-clicking the Form, ViewProperties and fill in the Description box that is presented.
formDesc.PNG
 

isladogs

MVP / VIP
Local time
Today, 02:56
Joined
Jan 14, 2017
Messages
18,246
If you create a form description manually then use the database documenter, you will see the Description property listed
However, using VBA, the Description property has to be created first before it can be populated.

Although I've never tried to do this, Allen Browne has code that I believe should do what you want.
Seethe SetPropertyDAO function at http://allenbrowne.com/func-DAO.html#SetPropertyDAO

Alternatively, see if you can adapt the code from this old AWF thread - post #4 contains code that may help

Let us know how you get on
 

Users who are viewing this thread

Top Bottom