Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2007

Tip: Looking for answers? Try searching our database.

label using Next Record If

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karren - 09 May 2007 16:00 GMT
I am trying to create a label that catalogs student information.  I want to
go to the next record if the ID number changes.  First line I have and ID
number, Last name and First name.  The second line I have inserted a table
where I have four fields.  My excel file have multiple lines with the same ID
number (same person) and I want a list of the information that pertains to
that number.  I'm guessing that I would use the Next Record If statement but
I don't know what to put in the Compare to field.
Peter Jamieson - 09 May 2007 17:43 GMT
Before you go much further on this one, I suggest you
a. consider creating this applicaiton in Access (if you have it) rather
than Word, because Word is not really designed to do this kind of mailmerge
b. see

http://homepage.swissonline.ch/cindymeister/mergfaq1.htm

and

http://support.microsoft.com/default.aspx?scid=kb;en-us;211303

Peter Jamieson

>I am trying to create a label that catalogs student information.  I want to
> go to the next record if the ID number changes.  First line I have and ID
[quoted text clipped - 5 lines]
> but
> I don't know what to put in the Compare to field.
Karren Lehman - 15 May 2007 13:44 GMT
I actually did attempt doing this is Access also.  I can get the information that I need in a report but when I use the label wizard I get only one course record per label.  The difference seems to be that the label puts the fields into text boxes.  I can't figure out how to keep all records together for the same student.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Karren Lehman - 15 May 2007 15:51 GMT
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
Peter Jamieson - 15 May 2007 16:03 GMT
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

> What I am looking for is:
>
[quoted text clipped - 9 lines]
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
Peter Jamieson - 16 May 2007 07:46 GMT
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

> OK, I'll have a look at the Access stuff and see what can be done.
>
[quoted text clipped - 17 lines]
>> EggHeadCafe.com - .NET Developer Portal of Choice
>> http://www.eggheadcafe.com
Doug Robbins - Word MVP - 15 May 2007 21:30 GMT
In Access, you need a subreport to contain the subjects for each student
that is linked to the main report by the student name or ID number

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> What I am looking for is:
>
[quoted text clipped - 9 lines]
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.