Query question.

  • Thread starter Thread starter Frank Martin
  • Start date Start date
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
 
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".
 
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.
 
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.
 
Back
Top