formatting crosstab query in a form (1 Viewer)

mubi_masti

Registered User.
Local time
Today, 15:01
Joined
Oct 2, 2011
Messages
46
I have embedded crosstab query instead of subform in a form but i am not able to format the columns and values of output result of query according to main form formating


for example i want to hide scrolls bar or navigation butthons which i likely can do with subform



is it possible to do this
 

Alansidman

AWF VIP
Local time
Today, 06:01
Joined
Jul 31, 2008
Messages
1,493
Instead of embedding your crosstab query in the form, why not make a subform with the record source the crosstab query. You can then easily modify the subform using the properties.
 

mubi_masti

Registered User.
Local time
Today, 15:01
Joined
Oct 2, 2011
Messages
46
dear

i have already tried this but by doing this subform cannot add or reduce fields if crosstab query produce more or less fields.

For example, first time query is producing three fields but when i add more data and run query again it shows more field but in subform number of fields remain three.

due to this reason i have directly embedded the query in the form
 

vbaInet

AWF VIP
Local time
Today, 12:01
Joined
Jan 22, 2010
Messages
26,374
If you want to hide scrollbars and so forth then you would need to resort back to using the subform. Plus, to use a crosstab query in a form you need to have fixed Column Headings. So if you want to go down this route you can always hide the irrelevant fields in the form using code.
 

mubi_masti

Registered User.
Local time
Today, 15:01
Joined
Oct 2, 2011
Messages
46
Sorry VBAInet

i m not getting you. i have tried a lot but unable to resovle the issue.

How i can use crosstab query for creating new fields in the form if query generate new field
 

Alansidman

AWF VIP
Local time
Today, 06:01
Joined
Jul 31, 2008
Messages
1,493
I am having difficulty in understanding why the cross tab information needs to be in a form if you have to run it and it changes the results with new fields added or deleted. Why not just have the Xtab query open upon execution. Perhaps some more information on the whys would help to understand.
 

vbaInet

AWF VIP
Local time
Today, 12:01
Joined
Jan 22, 2010
Messages
26,374
I don't understand why the use of a crosstab query on a form either. Perhaps you want to reconsider your design because I suspect that what you want to do should be done in a report.
 

mubi_masti

Registered User.
Local time
Today, 15:01
Joined
Oct 2, 2011
Messages
46
Dear

i think i am not able to describe what i want to do and why i m trying to do this

plz look at attached excel file in which i have tried what i actually want to do

if i add new team and that team visit only in City E then crosstab query add new column

if I use subform with crossstab query as source control then that column is not visisble but embedded query shows new column

i think it will explain my issue
 

Attachments

  • tesitng.xls
    17 KB · Views: 96

vbaInet

AWF VIP
Local time
Today, 12:01
Joined
Jan 22, 2010
Messages
26,374
We understand what you are trying to do but we don't understand why you need to use a crosstab query in a form. That's not the normal way of doing things.
 

mubi_masti

Registered User.
Local time
Today, 15:01
Joined
Oct 2, 2011
Messages
46
because the formatting of query are not proper, i want to hide navigation buttons, text alignment are not proper, text formatting is different from rest of format of form
 

vbaInet

AWF VIP
Local time
Today, 12:01
Joined
Jan 22, 2010
Messages
26,374
Yes, I know. As I told you before, a crosstab query is hardly ever used in a form. You would normally display it as it is or in rare occasions display it in a report.

I've already explained the ways to do what you want and it's not going to be easy.
 

Users who are viewing this thread

Top Bottom