Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing children 1

Status
Not open for further replies.

UntrainedAdmin

IS-IT--Management
Feb 25, 2004
7
US
I have a table with First Name, Last Name, Position
The positions are FHOH (Female Head of Household, MHOH and Child.
I can currently have up to 5 Child records per last name.
My report needs to look like this:
Last Name MHOH FHOH
Child1 Child2 Child3 ETC
First name First name First name

My question is 2 part:
1. Is there a way to set up a query to: Put the childs name below the Child1 Child2 etc Labels as long as the Last name is the same.
2. If there are not enough children (or no children) not give me an error.

Any thoughts?
Darrell
 
Hi

You talk about 'a table' and the ability to record details of upto five children

this makes me suspect you have a table structure which includes columns like so:

Child1Name
Child2Name
Child3NAme
..etc

if so stop and think again, this is not good table design and will lead you into all kinds of problems down the line



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken, Thanks for the quick post.
Nope my table looks like this:

Last Name
First Name
Position (1 of these 3): MHOH, FHOH or Child.

my problem is I would like to create a query (or Build an Rxpression) that on a report would put all the childrens names under the MHOH and/or the FHOH

Darrell
 
Hi

OK, jumped to the wrong conclusion!

So you 'limit' of five children is an artificial limit, not a limit of your table desgin.

First suggestion is to consider doing this with a sub report

You main reprt would list onl M or F HOH

Your sub Report would include only children,

Not sure from what you have given so far what your linking column would be, from information so far it looks like it would have to be LastName, but all of my commonsense tells me this is not a good choice, besides the possibility of duplicate LastNAmes, there is the obvious possibility that not all children in a 'family' have the same LastNAme as each other, let alone the MHOH or FHOH

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,
Good point and I have taken it into consideration - in reality There is a field in the table for Household ID so the children even if they have different names would still group together. For simplicity sake I just based it on Last name.
I know I can build a subreport, but was just curious to see if someone could build a query that would give me 1 child at a time.

Darrell
 
See sorting and grouping in REPORTS. While it is possible to arrange the query to do so, if the goal is to generate the report, the capability to group is a bit easier.





MichaelRed
mlred@verizon.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top