Acess2000: How to get reports filter condition into reports header?

A

Arvi Laanemets

Hi

The report is started from procedure
......
If Int(varRepMonth) = CDbl(varRepMonth) Then
varRepFilter = "INT(CDbl(Month)) = " & CDbl(varRepMonth)
Else
varRepFilter = "Month = '" & varRepMonth & "'"
End If
DoCmd.OpenReport varRepName, acViewNormal, , varRepFilter
.....

The field Month in reports source query is calculated as
...., Format$([Routes].[RouteDate],'yyyy.mm') AS Month, ...
, i.e. it has string values like "2006.01" etc.

The date interval for report is selected from combo (cbbRepPeriod), and can
have string values like "2006.01" or "2006" - as follows reports can be
monthly or yearly ones. Values are read from 2-column query, where the in
second column are values like "Yanuary 2006" or "Year 2006" respectiveli.

Is it possible to get the report header to be displayed like
StringValue & " for Yanuary 2006" or StringValue & " for Year 2006"


Thanks in advance!
Arvi Laanemets
 
G

Guest

Arvi,

Can't you just put a text control on the report and then set its source to
your expression?

Or are you doing that and it doesn't work?
 
A

Arvi Laanemets

Hi


Nick Coe (UK) said:
Arvi,

Can't you just put a text control on the report and then set its source to
your expression?

Yep! Did find this solution myself too. Of-course the report returns error
whenever not started from code, but I can live with it.


Thanks
Arvi Laanemets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top