Access 97 report question

D

DJACKSON

Is there a way to make a field show up horizontally instead of vertically on
a report? My objective would be to see the location field show up in one line
of the report. Is this possible, any help would be appreciated. Thanks

part Description Location
12345 widjet aaa
12345 widjet bbb
12345 widjet ccc
12345 widjet ddd
 
R

Rick Brandt

Is there a way to make a field show up horizontally instead of
vertically on a report? My objective would be to see the location field
show up in one line of the report. Is this possible, any help would be
appreciated. Thanks

part Description Location
12345 widjet aaa
12345 widjet bbb
12345 widjet ccc
12345 widjet ddd

A crosstab query should give you output like that and then you can base
the report on that query.
 
D

DJACKSON

How would I get the data to show up instead of having a function like
sum,first...?
 
R

Rick Brandt

How would I get the data to show up instead of having a function like
sum,first...?

If you use First() you will get the data unaltered. Or you can use the
Expression option.
 
D

DJACKSON

I'm not famlair with crosstab queries. I'm defiantly missing something.
I'm trying to get my query to show up like this but can't. What do you mean by
first()
location 1 location 2 location 3
part aaa bbb ccc
 
R

Rick Brandt

I'm not famlair with crosstab queries. I'm defiantly missing something.
I'm trying to get my query to show up like this but can't.

Use the new query wizard and specify Crosstab query for the type.
What do you mean by first()

A Crosstab query is going to expect you to aggregate on the Columns
produced with Sum(), Max(), Min(), etc.. If you don't want to aggregate
then First() will bring in your data without aggregating it.
 
J

John Spencer

One method if you just wanted all the location values in one field separated
by a comma (or other character) would be to use Duane Hookom's Concatenate
function

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=16

As an alternative see Allen Browne's solution.
http://allenbrowne.com/func-concat.html

--
Duane Hookom
MS Access MVP

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

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