Query question.

F

Frank Martin

I need to know how to format a query to produce columns of
"best fit" width. Specifically in a Xtab query.

Please help, Frank
 
D

Dorian

What do you mean by 'best fit width'?
The width of a column is really a display issue on whatever form or report
will show the results.
If you are saying you need to know the maximum length of the data in any
column of the entire table, you'd need to take a 2-pass approach where the
first pass calculates the max length of each column and the second pass
formats the data.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
F

Frank Martin

Dorian said:
What do you mean by 'best fit width'?
The width of a column is really a display issue on
whatever form or report
will show the results.
If you are saying you need to know the maximum length of
the data in any
column of the entire table, you'd need to take a 2-pass
approach where the
first pass calculates the max length of each column and
the second pass
formats the data.
-- Dorian
"Give someone a fish and they eat for a day; teach someone
to fish and they
eat for a lifetime".


I can do this manually in a Xtab query by selecting all the
columns and then left-clicking and selecting "column width"
and then choosing "best fit". The columns then collapse to
a width suited to their contents.

I want the query to this automatically.
 
B

Bob Barrows

Frank said:
I can do this manually in a Xtab query by selecting all the
columns and then left-clicking and selecting "column width"
and then choosing "best fit". The columns then collapse to
a width suited to their contents.

I want the query to this automatically.

Not possible. You can do it in a report or a form using VBA code. You have
no control over the resulting widths in a crosstab query.
 

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