Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

creating a function to get form descriptions

Posted on 2006-11-27
4
Medium Priority
?
478 Views
Last Modified: 2012-08-14
I'm using a query to list all the forms in a database and their descriptions. I've done this with queries using

Public Function ReturnQryDesc(ByVal sQuery As String)
    On Error Resume Next
    ReturnQryDesc = CurrentDb.QueryDefs(sQuery).Properties("Description")
End Function

However when I try to revise this for forms:

Public Function ReturnFrmDesc(ByVal sForm As String)
    On Error Resume Next
    ReturnFrmDesc = CurrentDb.FormDefs(sForm).Properties("Description")
End Function

I get the "method or data member not found" error on "FormDefs". How can I create a function that will pull the description of the form?
0
Comment
Question by:eliwil
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Raynard7
ID: 18023195
Hi,

A few things, firstly formDefs does not exist, secondly - there is no "description" for a form.

There is a caption.

if you have a form (fromX)

Forms("frmX").Caption
Forms!frmX.caption

both above will return the caption of the form - this may be what you are looking for, additionally you can only pull this information if the form is open.
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 18023264
try using Containers to get the form descriptions

CurrentDb.Containers("Forms").Documents(sForm).Properties("Description")
0
 
LVL 39

Expert Comment

by:stevbe
ID: 18027545
<aside>

you go Rocki ... a true diehard DAO guru ... using Containers / Documents / Properties the real meat and potatos of the DAO object model :-)

</aside>
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 18028267
:)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question