Potential solution to dynamic cross tab report??

CJBIRKIN

Drink!
Local time
Today, 19:56
Joined
May 10, 2002
Messages
255
Hello

I just posted this to the forum

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=33540

and it got me thinking.

In VB v5/6 you can create an array of objects such as text boxes and postion them on a form during run time.

Do you think it is possible to do a make table on a crosstab query then return the fieldnames for that table. Then you could create an array of textboxes with their control sources set to to each element of the array ( the field names) and position them on an access report as you load it.

What i'm basically asking is is the logic sound. I don't want to spend half a day trying this out if it's going no-where!!

Any replies will be greatfully received

Chris
 
If you can get something into a table, you can make a form for it and assign controls to correspond to the fields. So the first thing is making the table.

Try to do it in two stages.

Create the cross-tab query.

Then create a make-table query with the cross-tab as your record source.

If you can get it that far, the rest of it might not be so hard.
 
Hello

I'm happy about the make table part, it's more the creation of the report.
Now i know ( thanks loony22) that you can set the controlsource of an object at run time it's a question of creating multiple instances of the object ( is this possible??) to assign the control sources to and then formatting the report, all at run time.

I can also foresee that there are only so many textboxes etc that you can fit across a page and as you won't necessarily know how many crosstab columns your going to get it may start to look rather messy. Perhaps i'll add a crosstab report wizard to the microsoft access upgrade wishlist on their site.

Chris
 

Users who are viewing this thread

Back
Top Bottom