Order By on Report

A

Alvin

I have a Report that shows Mother & Father with all there children listed
below them. How can I keep all of them together?
Example:
On my report now it list them all ok except it carries over, at bottom of
first page it will have the parents and 1 child then second page will have
only the children.
I want it to show whole family on each page without splitting families from
one page to another.
Thanks In Advance
Alvin
 
6

'69 Camaro

Hi, Alvin.
I have a Report that shows Mother & Father with all there children listed
below them. How can I keep all of them together?

Use the Sorting and Grouping toolbar button or use the Tools -> Sorting and
Grouping menu to open the Sorting and Grouping dialog window. If you already
have a Group Header on the Parents' field name, then select this field in the
"Field/Expression" column in the upper pane, and then select "Whole Group" in
the "Keep Together" Property in the lower pane, Group Properties.

If you don't have a Group Header on the Parents' field name, then create one
by selecting the Parents' field name in the "Field/Expression" column's combo
box in the upper pane. In the Group Properties pane below, select "Yes" in
the "Group Header" Property and select "Whole Group" in the "Keep Together"
Property.

Close the Sorting and Grouping dialog window and save the report, then open
it. The children's names will appear together on the following page with the
parents' names, instead of being split between two pages.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.
 
A

Alvin

Thank you '69 Camaro,
That works for me. I couldn't remember what to do Here. I'm self tought and
still learning. Is there any chance you could ansewer this one if Not I will
post later.
I have a form where I enter Animals. Once the info is entered I would like
to protect that info. What I am saying is this.
I am breeding animals. If say one of the male breeders die I still need his
info in the database if he is the father of any of the other animals and the
only way I would want to be able to delete him is if he has absolutly no
relationship to another animal otherwise his info will be needed because he
is the father of another animal.
I have radio buttons in the code below.
Here is what I have so far but not sure what to do from here.
My autonumber for all animals is "[AnimalID] if that helps. Thanks in Advance.
Alvin
---------- My Code---------------------
If Me.Protect = yes Then
MsgBox "If You Un-Protect This Animal" & Chr(13) & Chr(10) & Chr(10) &
"You May Accidently Erase Information That Could Cause Data To Be Displayed
Incorrectly!" & Chr(13) & Chr(10) & Chr(10) & "Are You Sure You Want To
Un-Protect ( " & [Form_Add Male Breeders]![AnimalName] & " ) At This Time?" &
Chr(13) & Chr(10) & Chr(10) & "If Not! After You Click OK Click On Protect",
vbOKCancel, Cancel = True
Me.Protect = yes
Else
MsgBox "You Have Succesfully Protected ( " & [Form_Add Male
Breeders]![AnimalName] & " ) At This Time?", vbCritical, "Both Are Female"
End If
----------End code-----------------------
 
6

'69 Camaro

Hi, Alvin.

This is a separate question and would be better posted in the Database
Design newsgroup (microsoft.public.tablesdbdesign). But I'll give you an
overview of what you should do and why. A relational database is perfect for
what you want to do, because it won't allow you to delete a record (parent)
that has related records (offspring of this parent) when referential
integrity is being enforced. One should never let code do what the database
engine is designed to do, because the code may not be able to handle certain
situations, mistakes happen, and it's not nearly as efficient.

You should create a separate table to hold the records of these parents and
create a one-to-many relation from this table to the table that holds the
records of all the animals. When you create the relation, make sure that the
"Enforce Referential Integrity" check box is checked and "Cascade Delete
Related Records" is _not_ checked. That way, if the parent record is
deleted, the database engine (Jet) will warn you that you cannot delete this
record because related records (offspring) exist.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.


Alvin said:
Thank you '69 Camaro,
That works for me. I couldn't remember what to do Here. I'm self tought and
still learning. Is there any chance you could ansewer this one if Not I will
post later.
I have a form where I enter Animals. Once the info is entered I would like
to protect that info. What I am saying is this.
I am breeding animals. If say one of the male breeders die I still need his
info in the database if he is the father of any of the other animals and the
only way I would want to be able to delete him is if he has absolutly no
relationship to another animal otherwise his info will be needed because he
is the father of another animal.
I have radio buttons in the code below.
Here is what I have so far but not sure what to do from here.
My autonumber for all animals is "[AnimalID] if that helps. Thanks in Advance.
Alvin
---------- My Code---------------------
If Me.Protect = yes Then
MsgBox "If You Un-Protect This Animal" & Chr(13) & Chr(10) & Chr(10) &
"You May Accidently Erase Information That Could Cause Data To Be Displayed
Incorrectly!" & Chr(13) & Chr(10) & Chr(10) & "Are You Sure You Want To
Un-Protect ( " & [Form_Add Male Breeders]![AnimalName] & " ) At This Time?" &
Chr(13) & Chr(10) & Chr(10) & "If Not! After You Click OK Click On Protect",
vbOKCancel, Cancel = True
Me.Protect = yes
Else
MsgBox "You Have Succesfully Protected ( " & [Form_Add Male
Breeders]![AnimalName] & " ) At This Time?", vbCritical, "Both Are Female"
End If
----------End code-----------------------




'69 Camaro said:
Hi, Alvin.


Use the Sorting and Grouping toolbar button or use the Tools -> Sorting and
Grouping menu to open the Sorting and Grouping dialog window. If you already
have a Group Header on the Parents' field name, then select this field in the
"Field/Expression" column in the upper pane, and then select "Whole Group" in
the "Keep Together" Property in the lower pane, Group Properties.

If you don't have a Group Header on the Parents' field name, then create one
by selecting the Parents' field name in the "Field/Expression" column's combo
box in the upper pane. In the Group Properties pane below, select "Yes" in
the "Group Header" Property and select "Whole Group" in the "Keep Together"
Property.

Close the Sorting and Grouping dialog window and save the report, then open
it. The children's names will appear together on the following page with the
parents' names, instead of being split between two pages.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.
 

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