How do I get the query to display?

G

Guest

My query currently displays 2 colums and 6 rows, as below.
NAME SUBJECT
-------------------------------------
Row1 Alan Maths
Row2 Alan Science
Row3 Alan Chemistry
Row4 Bob Maths
Row5 Rose PE
Row6 Rose Science

I would like it to display 2 colums and 3 rows, the subject colum containing
multiple lines.
NAME SUBJECT
---------------------
Row1 Alan Maths
Science
Chemistry
Row2 Bob Maths
Row3 Rose PE
Science

Thanx
 
J

John Vinson

I would like it to display 2 colums and 3 rows, the subject colum containing
multiple lines.

Do it on a Report, and set the properties of the other textboxes to
suppress duplicates. There's no easy way to do this in a Query, but
you shouldn't be looking at query datasheets anyway.

John W. Vinson[MVP]
 
S

Smartin

CK said:
My query currently displays 2 colums and 6 rows, as below.
NAME SUBJECT
-------------------------------------
Row1 Alan Maths
Row2 Alan Science
Row3 Alan Chemistry
Row4 Bob Maths
Row5 Rose PE
Row6 Rose Science

I would like it to display 2 colums and 3 rows, the subject colum containing
multiple lines.
NAME SUBJECT
---------------------
Row1 Alan Maths
Science
Chemistry
Row2 Bob Maths
Row3 Rose PE
Science

Thanx

A query is not going to format your results nicely so, but a report
could. Create a report based on the query and add grouping to the "Name"
field. Note: "Name" is a reserved word and as such, is not a good field
name. If this is really your field name I suggest changing it to
"PersonName" or some such.
 
G

Guest

Thank you John and Smartin for the replies. I tried creating a report but
here is the problem:

I need to export the data into Microsoft Excel as it is i.e create a
spreadsheet with
2 colums and 3 rows. The subject entries will be in one cell, each on a
line NOT a row (carriage return / line feed.)

So, getting the linefeed/ carriage return is simple in Excel the problem is
getting the data from access into Excel in that format.

thanks
 

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