display dynamic report title

eugz

Registered User.
Local time
Yesterday, 19:50
Joined
Aug 31, 2004
Messages
128
Hi All.

I have form with ComboBox that has list of projects. And I created chart report that reference for those projects. I would like when user will select value from project list and click button to open report so report will display project name as a title. How it to do? I will appreciate for sample.

Thanks.
 
Place a text box on your report where you want to display the title.
Open the properties window.
In the control source enter

Code:
=Forms!frmName.cboYourTitle
Change frmName to the name of your form
Change cboYourTitle to the name of the combobox
 
Hi sxschech. Thanks for replay.

I have query and result of it look like:

Name| Q1 | Q2 | Q3 | Q4
-----+----+---+----+-----
AAA 12 45 78 59
AAA 16 48 71 65
AAA 18 42 72 61

Is it possible create a chart based on this query and use value of column NAME like chart title?

Thanks.
 
Last edited:
Hi eugz,

You can have a col name as a chart title, but if you are doing it from a query, will probably need to do a dlookup. On the report in a text box, something like:

Code:
=dlookup("fieldname","queryname","criteria='lookfor'")
keep the quotes and change the names to what they should be from your query. here is an example:

=dlookup("group_name","qryList","cwid='12345A'")
 
Hi sxschech. Thanks for replay.

The first parameter is field name. In my case it is NAME
The second parameter is query name.

Is it correct?

Can your explain about third parameter "criteria='lookfor'"? What does it do and for what purpose it used?

Thanks.
 
Can your explain about third parameter "criteria='lookfor'"? What does it do and for what purpose it used?
This equivalent to a where clause without the word Where. This part is optional, so if know you will only be returning one value, then you don't need it, but if more than one value could be returned, then you will need to specify a where clause criteria since the dlookup should only display one value as your header such as:

Code:
"NAME = 'AAA'"
 

Users who are viewing this thread

Back
Top Bottom