Crosstab in a form

Gismo

Registered User.
Local time
Tomorrow, 00:02
Joined
Jun 12, 2017
Messages
1,298
Hi all,

Is it possible to have a crosstab query in a form?
When the crosstab query gets added coulombs as the data changes or added, such as months, how will this be automatically be added in the form as the form are set in the controls created
 
You can display a crosstab query as a query in a subform. Otherwise, you'll need some code if you want to use other controls.
 
By using the query itself as the subform (drag the query onto the main form), you force Access to build a form on the fly and so new columns are not a problem. Of course you get no control over the format but that's the trade off.

It is possible to handle a form bound to a crosstab but it takes some code. The only limitation is that you have to fix the width of the form at design time so you are limited to the number of columns that are selected. If you potentially have more than will fit on 22.75 inches (max form width), you will need to export to excel. Your crosstab is limited to 255 column though.

If you need the sample of naming the columns on the fly, here's a link.
 
Hi all,

Any reason why the cross tab query on a form would display as below?

I have to click click on the + first to display the query

1670217879360.png


1670217918883.png
 
I tried dragging a CROSSTAB query onto a form and Access does not allow this for any table/query. I have to first install subform container control and set its SourceObject property to CROSSTAB query. Was table/query drag and drop added to versions after Access 2010?
 
Last edited:
I tried dragging a CROSSTAB query onto a form and Access does not allow this for any table/query. I have to first install subform container control and set its SourceObject property to CROSSTAB query. Was table/query drag and drop added to versions after Access 2010?
Yes I am using 2016
 
When I drag on a crosstab, the wizard automatically creates a form.
 
When I drag on a crosstab, the wizard automatically creates a form.
Thank you
Did not know It would automatically create a form
I first created the form then dragged the query

But dragging the query onto the main form worked well
 

Users who are viewing this thread

Back
Top Bottom