Page change for each worker in my table

M

macdoum

Hello. English is not my first language. So pardon me if I'm not the
clearest !

I have a table that has the infos about the schedule of nurses.

The table is like this :

NAME / FIRTS_NAME / DATE / START_TIME / END TIME

Every name has some workshifts.

I made a report with the wizzard. The report lists all the workshifts
of a person in the table.

But how do I make the report start a new page when the person's name
changes ?

Or how can I have a workshifts report for each person ?
 
F

fredg

Hello. English is not my first language. So pardon me if I'm not the
clearest !

I have a table that has the infos about the schedule of nurses.

The table is like this :

NAME / FIRTS_NAME / DATE / START_TIME / END TIME

Every name has some workshifts.

I made a report with the wizzard. The report lists all the workshifts
of a person in the table.

But how do I make the report start a new page when the person's name
changes ?

Or how can I have a workshifts report for each person ?


In Report Design View, click on View + Sorting and Grouping
In the Field/Expression column write:
=[Name] & ", " & [FirstName]
Write Ascending in the Sort Order column.
Set Group Header to Yes in the lower panel.
Save the changes.
Back in Design View right-click on the new Group Header. Select
properties. Set the Force New Page property to Before Section.

Add an unbound control to the Group Header.
Set it's Control Source to:
=[Name] & ", " & [FirstName]

When you run the report, each nurse will be on her own page.

NOTE #1:
It's quite possible that there may be more than one nurse with the
same name. Rather than using the name fields it would be better to use
the NurseID field, in which case you would set the Field/Expression to
[NurseID] instead of =[LastName] & ", " & [FirstName].
Everything else would remain the same.

Note #2:
If you really do have fields named "Name" and "Date", Name and Date
are reserved Access/VBA/Jet words and should not be used as field
names.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'
 

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