How to Access description of a Form object

Hi Folks,

I need some help in VBA coding..
I have an application in which my backend data is stored in SQL Server 2005 .
Front end has been written in MS-Access 2002, so it is obvious that the front
end is an Access Database which contains forms, reports and queries.  

My current task at hand: There are forms and sub-forms in the front end
database.  Only the form objects and report objects have "description" on
them apart from the "form.Name".
I need to write the code snippet to read the front-end database and display
the form and report Descriptions of only those objects which have
descriptions.  

Can somebody help me please...
Thanks in advance

Sampath

0
sampathsubramanian
1/12/2008 7:56:40 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
634 Views

Similar Articles

[PageSpeed] 5

Sounds like an extremely unusual requirement. I can't imagine why you'd need 
code to display an unknown number of forms and reports: open forms and 
reports is usually something that the user does depending on what activity 
they're trying to do.

I suppose you could do something like:

On Error Resume Next

Dim dbCurr As DAO.Database
Dim docCurr As DAO.Document
Dim strDescription As String

  Set dbCurr = CurrentDb()
  For Each docCurr In dbCurr.Containers("Forms").Documents
    strDescription = docCurr.Properties("Description")
    If Err.Number = 0 Then
      DoCmd.OpenForm docCurr.Name
    End If
  Next docCurr
  For Each docCurr In dbCurr.Containers("Reports").Documents
    strDescription = docCurr.Properties("Description")
    If Err.Number = 0 Then
      DoCmd.OpenReport docCurr.Name
    End If
  Next docCurr


-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"sampathsubramanian" <u40604@uwe> wrote in message news:7e1cf74621cca@uwe...
> Hi Folks,
>
> I need some help in VBA coding..
> I have an application in which my backend data is stored in SQL Server 
> 2005 .
> Front end has been written in MS-Access 2002, so it is obvious that the 
> front
> end is an Access Database which contains forms, reports and queries.
>
> My current task at hand: There are forms and sub-forms in the front end
> database.  Only the form objects and report objects have "description" on
> them apart from the "form.Name".
> I need to write the code snippet to read the front-end database and 
> display
> the form and report Descriptions of only those objects which have
> descriptions.
>
> Can somebody help me please...
> Thanks in advance
>
> Sampath
> 


0
Douglas
1/12/2008 8:29:17 PM
Reply:

Similar Artilces:

Code to fill Word form for multiple records from Access
This is the code I've been working with, but it freezes Access: Private Sub Command66_Click() 'Print Physician Profile. Dim appWord As Word.Application Dim doc As Word.Document 'Avoid error 429, when Word isn't open. On Error Resume Next Err.Clear 'Set appWord object variable to running instance of Word. Set appWord = GetObject(, "Word.Application") If Err.Number <> 0 Then 'If Word isn't open, create a new instance of Word. Set appWord = New Word.Application End If Set rs = Db.OpenRecordset rst.Open Me.RecordSource, CurrentProject.Co...

VBA Event Procedures won't run in Access 2007
For some strange reason none of my Event Procedures are running in my access database. I can use macros for events just fine, but if I want to use a VBA event procedure nothing happens. If I put breakpoints in at any event in the VBA code, I never see a single one come up. What is going on here? Do I have to enable VBA somewhere in Access 2007? I'm really pulling my hair out with this one. Thanks for any help! -mindseye11 See this page for a nice explanation: http://www.access.qbuilt.com/html/trust_center.html -- Jeff Conrad - Access Junkie - MVP Alumni SDET - XAS Services - Microsoft...

Unable to access Office Apps
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Folks, I'm a Mac newbie attempting to assist my daughter. I've installed Office 2008 for the Mac as the administrator. My daughter logs in and upon clicking on the Word icon, a question mark appears over the icon and the application does not open. The same happens for Powerpoint and Excel. I know someone has seen this before. Any suggestions? Thanks, Chuck. Random guess--you removed Office 2004, but the 2004 icons are still in the Dock, and those are the ones you are trying to use. Find the actual applications in the hardd...

Excel Pivottable using data in Access 2002
I have been using Access 2000 to hold tables with lots ( 200,000 rows ) of data. In Access 2000 you can make a Pivottable Form which starts Excel and really makes the pivottable there although the data actually stays in Access. Works great. I've recently gotten Access 2002 which tries to make the Pivottables itself. It's not as good. I want this new verson of Access to work with Excel like the old version. This new verson offers to let me "export" the pivottable, but that tries to start Excel and copy the data in and there's too much data for it to be able to do tha...

Input a date using a Form Button.
Hi, Please help as I'm totally lost with this one! I'm doing a little project for work and I have come across a littl problem with a date input that I have set up using a Form Button. No this button once pressed enters the date just as I want, into th correct Cell (the buttons called "Todays Date") Now I have recorded macro so that the button executes the =TODAY() comand - which is fin untill the date changes!! As you can emagine I need the date to stay a it was when first pressed as its a database I'm trying to compile. Does this make any sense to you all?? I will...

Reference Grouped Objects Using VBA
Hello I have grouped four charts, three text boxes (from the control toolbox) and a rectangle. Prior to grouping, the code I had to update the axes on both charts and text for the text boxes worked fine. After grouping the objects the code fails. How do you reference a specific object contained in a group? If Shp is a grouped shape then Shp.GroupItems(2) references the second shape in the group -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware .. "BJ" <bradley.john@westrac.com.au> wrote in message Hello I have grouped four charts, three text ...

Merge text stacked upon an object into one picture?
I placed a graphic (vinal record disc) then stacked text upon it via text boxes. Can they be merged into one copyable picture? What version Publisher? Group the objects, right-click, save as picture. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Chiefhollis" <Chiefhollis@discussions.microsoft.com> wrote in message news:901225A7-9A8E-4046-BF7A-5FF17E06CB6D@microsoft.com... >I placed a graphic (vinal record disc) then stacked text upon it via text > boxes. Can they be merged into one copyable picture? It ...

Access
Hi, i have a on going database for my employees and i would like to add another column employee ID number. On the existing table the column employee ID is there but no number associated to the employee. I want to import from excel. the excel file has all employees name and employee number. EE name is the primary key and i only want to import the EE ID number only, the rest of the column in the table leave as is. can someone help me with this? thanks On Tue, 18 May 2010 00:44:55 GMT, "accessnote" <u60148@uwe> wrote: >Hi, i have a on going database for my ...

Changing account access to applications
This is a multi-part message in MIME format. --------------090505000902020706000303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I recently added a password to my logon. That added a "Guest" account to my logon screen. I see that some applications that I installed over the years are available to the guest account. Can I remove access without having to reinstall the application? --------------090505000902020706000303 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC &q...

PROCV from Access
Dear all, with help, I create a validation in a range of excel (the data is from access). For example: in this code below excel create a list - the data is of access - and put this list like a validation in a range. This list contain the accounting code. Now I'm looking for a code that put the accounting description. It=B4s very important to me, that all I'm doing is VBA code!!! and I must work with one sheet, I wouldn't like to bring all information of the table of access and put in a sheet!!! For example, if I select in range a1 the code 10, then in the range b1 appear salary. ...

Journal Form...?
On my computer at work, in the Outlook (Xp) Journal - form, the pull down for "Entry Type" is blank except for "Access, Excel, Power Point..." Where did the "Phone Call, Note, Fax, Meeting, etc..." go? How do I get the proper list back? I have tried [Help-Detect and Repair] I have tried Properties (in Form Design) but the first page of the Journal Form in design mode is null... The various Journal entry types are registry entries. See http://www.inquiry.com/techtips/exo_pro/10min/10min0999.asp for information about how to add custom entries. The same pr...

open form with no data
Hi, I have a form on which i present al lot of data from a database. On the form is a comobox which i use to select the right record en present the data of this record on the form. When i open de form, de combobox is empty (which is good !) but the rest of the form is already filled with the data of a record in the database (which is not good). When i choose a record for the combobox, the form is filled with the data of that particular record (which is good). So the only problem i have is on opening the form. Is it possible to open the form without it being filled with data...

Access Relationship Help
Hi, I am having trouble working with Access. Here is my scenerio: I am suppose to create an Entity Relationship Diagram for a specific problem. The categories for creating an ERD are: Song Title, Artist, Album, Genre, Duration, Location, and Tempo I came up with a relation: Artist -> Album -> Song -> Duration, Location, Tempo Artist -> Genre I tried to create this relationship with the Table Wizard; however, I do not know exactly how to create this. How many tables do I need? Do I need to all 7 tables, or do I need only 3 main tables (and put the others in subcategories)? ...

Limited Access Pages
Is it possible to create web pages in Publisher that have a limited access group, i.e. that certain viewers cannot see? Just guessing here, don't post a hyperlink to the page. Give the URL to the folks you want to see it. These type questions are best asked in the web design group, the below will setup the Microsoft newsgroups in your newsreader. news://msnews.microsoft.com/microsoft.public.publisher.webdesign -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Sheerhell" <Sheerhell@discussions.microsoft.com> wr...

Access 2007 graph/chart
I have created an access graph in Microsoft Office XP Professional using a union query. I have now moved the database into Access 2007. When I look at the graph in design view everything is fine. When I switch to form view, the window around the graph is present but no graph. If I click on the window, the graph appears as seen in design view (correct). How can I make the graph load properly? Is this a focus issue? Would appreciate any help. Thanks. Arnold ...

Urgent: Accessing CRM DB
We have CRM installed for our sales team. There is an in house application which has to access the accounts stored in the CRM system. This is avery urgent requirement and to save time we are thinking of accessing the crm database directly to read the accounts (though microsft recommends the use of SDK). My questions are - Is this a safe approach (keeping in mind that we will just read the information, not update/delete anything) - What should be the query filters to pick accounts? Should it be deletionstatecode <> 2 only? The other question I has was, is it ok to create custom ta...

how can I attach a single access database form to an email
I want to attach a single database form to an email, im not sure if this is possible, Do you really mean a Form or a Report? Steve "tony" wrote: > I want to attach a single database form to an email, im not sure if this is > possible, Hi Steve, yes a report "SteveM" wrote: > Do you really mean a Form or a Report? > > Steve > > "tony" wrote: > > > I want to attach a single database form to an email, im not sure if this is > > possible, ...

password protected to sub form
i have a form which don't want to be used by everyone.it should be protected with a password. i have Main form which calls many sub forms, one of the sub forms need to be protected with password. Below are the forms created in my database frmForm frmMain1 frmPassword frmForm has a command button(cmdDo) which calls Form(frmPassword). in frmPassword there is text box(PASSWORD),when i type password as A to my text box this should open my frmMain1 ...

Open form to specific record from button on continuous form
I have a continous form with limited data and I would like to have a button which then opens up a selected record in another form. I've placed the button via the wizard and, while it opens the form, it doesn't open to the selected record. It it possible to have a button on a continous form which would then open to a bookmarked record on another form? The wizard put this code, is it possible to modify this? Thanks. Private Sub btnOpenForm_Click() On Error GoTo btnOpenForm_Click_Err DoCmd.OpenForm "frmName", acNormal, "", """...

Access 2007 02-27-08
On the Access options where you can select a form to display on launch. How do I indicate that I want the form from the custom view to launch (this is so that the Hide Design UI can be used) Cheers ...

Can't boot or access C drive
Windows XP won't boot. I tried reinstalling Windows but keep getting a blue screen even after deleting, recreating and formatting the C drive. I booted with an MSDOS floppy but can't access C drive. It may be a boot sector virus. How do I format the entire hard drive so I can do a clean install? "rj" <rjnothere@netzero.net> wrote in message news:ulZXW#DJLHA.1868@TK2MSFTNGP05.phx.gbl... > Windows XP won't boot. I tried reinstalling Windows but keep getting a > blue > screen even after deleting, recreating and formatting the C drive. I &g...

Xrefs from Form Fields not Visible
I've got a form that uses xrefs (bookmarks) to repeat field text elsewhere in the doc. Some of the xrefs are showing up as gray boxes, but not all are. The xrefs are functional even if invisible. Removing the \h switch from the xref fields and updating the field does not cause the field to become gray. The paragraph style is the same for both visible and invisible xrefs. I'd like them all to be shown as gray boxes so that my (tech-unsavvy) users can see that the fields are actually there. I do have Show Bookmarks (and Field Shading) checked ON in Word Options. Tha...

Prevent user from closing form -- form event
I have 2 buttons on my form. Button1 to import the data and Button2 to upload to database. I want user to click first on button1 and then next on button2 before closing the form. What form event I should use to prevent user from closing the form with out clicking on 2nd button? Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access/201004/1 You can use the Unload event. You can prevent the form closing by setting Cancel = True in the unload event. You will need a way to notify the form that uploading has finished. You can put a...

Access 2003 Reports
Can someone tell/show me how to implement a conditional section in a report? I want to put in a section footer based on fields in the last two records in the detail section. ...

division in access to round-up if division not whole number
when dividing a by b giving c; need to round-up c if it is not a whole number Excel has roundup but Access is devoid of this function. Round( a / b ) should give you what you need. That's actually Round( a / b, 0) where the number to the right of the comma is the number of decimals to round. As the helpfile in Access notes, if this is omitted, integers are returned. "ddiel" wrote: > when dividing a by b giving c; need to round-up c if it is not a whole number > Excel has roundup but Access is devoid of this function. "ddiel" <ddiel@discussio...