Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Report names AND DESCRIPTION in combo box

Status
Not open for further replies.

sohunter

Technical User
Dec 3, 2001
106
0
0
US
I would like a report's Description to appear in a combo box that's retrieving certain report names.

This works great (in the row source) for showing just the reports that I want:

Code:
SELECT Mid([msysobjects].[Name],7) AS Expr1 FROM msysobjects WHERE (((msysobjects.Name) Like "rptDM_*") AND ((msysobjects.Flags)=0) AND ((msysobjects.Type)=-32764)) ORDER BY msysobjects.Name;

When I try this:
Code:
SELECT Mid([msysobjects].[Name],7) AS Expr1, msysobjects.Description FROM msysobjects WHERE (((msysobjects.Name) Like "rptDM_*") AND ((msysobjects.Flags)=0) AND ((msysobjects.Type)=-32764)) ORDER BY msysobjects.Name;

I get an Enter Parameter Value message box, referring to msysobjects.Description

Is this even possible, without getting into more involved coding, eg as displayed in thread705-801514 ?

By the way, I know it's controversial on this forum to show users your report names. ; ) But the ones I'm showing via the where clause have very user-friendly names. I'd prefer not to go the route of creating a "report table".
 
Description is not a field in msyobjects.
Is this even possible, without getting into more involved coding
I don't think so.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
The system table MSysObjects does not contain a field named Description. You could have your query call a function that returns the Description of the table. But this, in ensence, requires each report to be opened to retrieve the Description.

It's not that difficult nor time consuming to create a report table. The first field of the table would be the name of the report. Set the lookup property of the report name field to a combobox and set the comboboxes RowSource to your query above. The second field would be you description. It would be much faster to display the contents of this table then to build it on the fly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top