Duane,
I have more questions regarding this issue. Should I
repost so there is a newer date with the newer issues?
What I need to know, is this the only way to accomplish
changing the report based on the column headers?
Would making a separate report for each column header
count work? ie report#2 = 2 columns of data, report#3 = 3
columns of data.
Where I am working at, they do not want much coding done.
But I don't see any way around it.
G
-----Original Message-----
There is a demo for creating crosstab reports with
dynamic column headings
at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.
This solution will
create unique column headings based on the customer since
each customer
could have a unique set of account names.
--
Duane Hookom
MS Access MVP
--
Thank you, Marsh.
I have a pre-built report that runs off a query.
I have purchased developer books and that is where this
code comes from. However, I am still experimenting with
it.
I have a ways to go, I know *S*
The problem I have is this:
1. The report will be run for different customers each
time.
2. Each customer has several different account names
(column headings)
3. The source is a crosstab query.
Do you have a better solution for this? These will be
showing different accounts and their data, kinda like
it is
done for different months.
Yes, I had it in the wrong area......
Once again, thank you.
G
-----Original Message-----
G wrote:
I am having difficulty adding controls to a report. I
am
able to create the report as follows:
Set rpt = CreateReport
With rpt
.RecordSource = "qryCalculateMktValue"
.Caption = "LNW"
.Visible = True
End With
' Restore new report.
DoCmd.Restore
But the following does not work:
with CreateReportControl(reportname as string,
controltype
as integer)
It not only does nothing, it will not let me set
anything,
like .name
what am I doing wrong?
It sounds like you're due for my Create... lecture ;-)
From the tone of your question, I get the impression
that
you are not using that code to build yourself a design
aid
kind of wizard. If you're thinking of doing this kind
of
thing at runtime, then you're on the wrong track.
For several very good reasons, it's a really bad idea
to be
creating heavy duty objects such as forms or reports
on the
fly. Instead, you should have a prebuilt report that
can
take care of your various situations and then set
control
and/or grouplevel properties to adjust as needed at
runtime
(usually in the report's Open event).
Besides, without seeing the actual line of code that
you're
trying to use, no one's going to be able to figure out
what's wrong with it.
--
Marsh
MVP [MS Access]
.
.