View Single Post
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Access Label

Thanks to Doug for the key reminder!

Assuming your data is like this

ID,Lastname,Firstname,X1,X2,Coursename,Grade
111,Doe,Jane,1234,12,Math,A
111,Doe,Jane,,2345,23,Science,B
111,Doe,Jane,3456,34,Health,C
222,Doe,John,2222,14,Math,B
222,Doe,John,3333,22,Science,A

(sorry, I have no idea what all the numbers mean! I've assumed your #### is
probably an ID of some sort.)

Let's suppose you are still maintaining the data in Excel.

Then you can either import the data into Access or link to your Excel table.
Let's call the table you create "grades".

Assuming you have a unique ID foe each individual, create a query in Access
based on "grades" that selects the ID information that is the same in each
row (in this case, ID, LAstname, and Firstname. Call the Query "student".
When you execute the query, you should see one row for each student.

Use the label wizard to create labels based on the student query. The wizard
will probably put an item such as =Trim([ID] & [Lastname] & [First]) in the
detail section.

In the Report design toolbar, click Subform/Subreport then draw a box that
covers the area where you want the grades info. to go. Check the USe
existing tables and queries (there probably won't be another option at this
point).
Select all the fields that
a. you need to link to the student query (easy if it's just |ID)
b. you want to appear in the output (e.g. X1,X2,Coursename, Grade)

Link ID in the subreport to ID in the main report (or link whatever fields
you need)

Access creates a box for the subreport. You will need to remove the ID
fields from the Detail (and if you keep them, the Header area). They were
only there to let you make the link. You will probably also need to remove
the subreport name from the Detail area of the main report, remove the
subreport "Report Header" fields, shift all the fields to the left, reduce
the width of the report and make the subreport border transparent (unless of
course you want the border). There are probably other ways to do this where
you create the subreport separately - I'm not in a position to tell you
which approach works better.

If you were maintaing this data in Access in the first place, you would
start with a table for the student data (i.e. just the identifying
information), then create a separate table for grades that had (e.g.
ID,X1,X2,Coursename,Grade). The above process would be slightly different
becaus eof the different structures involved.

Peter Jamieson

"Peter Jamieson" wrote in message
...
OK, I'll have a look at the Access stuff and see what can be done.

The Word-based approaches I pointed you to originaly mostly depend on
being able to use a catalog/directory merge - trying to do it with labels
would be a nightmare, I suspect.

Peter Jamieson

"Karren Lehman" wrote in message ...
What I am looking for is:

######### Doe, Jane

1234 12 Math A
2345 23 Science B
3456 34 Health C

What I get is one name, one course...this creates 6 labels for a single
student.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com