crosstab subreport

G

Guest

Can someone explain this behaviour?

I have a subreport that is based on a crosstab query. I've used code to
create the subreport.

Works perfectly...that is, all codes are executed in the "Report" events,
and the subreport shows data.

The problem arises when I include Query parameters (a date range) in the
Crosstab query. For some reason, the only codes that are executed are codes
in the Report_Open() event then immedietly goes to the Report_Close() event.

Why are all the other events (Detail_Format or Detail_Print) skipped?
 
D

Duane Hookom

Have you:
- set the query parameter data types?
- set the column headings property?
What kind of code do you use to"create the subreport?
 
G

Guest

1) Yes....date/time
2)column heading is taken from the query, for dynamic columns
3)I used code similar to your Crosstab.mdb....

I'm oblivious as to why access behaves one way with parameters and another
way without.
 
G

Guest

Duane,

I figured out what you meant by column heading properties. A new problem
arises, my columns need to ordered by month. Depending on the year, I would
want my columns ordered in accordingly. For example, if my query spans from
Nov/2005 to Jan/2006, my columns would be 11, 12, 01. If it's from Dec/05 to
Feb/06, columns would be ordered 12,01,02.

How can I do this?

Thnx!
 
D

Duane Hookom

Don't use actual months or date increments for crosstab column headings. Use
the number of months or weeks or days relative to either today or to a date
entered into a control on a form. Then use DateDiff() to create your column
headings.
 

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