Sorting & Grouping Problem in Report

S

Sandra

Well I'm stumped! I have a master header table named
People/Places containing PPID (autonumber primary field)
and NameID (the primary last name of the the household),
in addition to address fields, etc. I have a detail table
called AddName to list the information for each individual
in the household. This table contains ANID (autonumber
primary field) and PPID (to link to the master table),
along with other information fields.
I want the report to list the records alphabetically
rather than by the autonumber. I cannot seem to get the
sorting and grouping right for the report I want to see.
When grouped by:
People/Places.PPID header
NameID header
the master records are listed by number and not
alphabetized. However, the detail records are linked
correctly to each master record. When grouped by:
NameID header
People/Places.PPID header
the master records are alphabetized, but then the detail
records are grouped according to any common NameID that
may occur in the master table. In other words, if I have
records in my master table like 501 (PPID)- Smith (NameID)
and 24 (PPID) - Smith (NameID), these are separate
households but the detail records are grouping on the
common field of Smith rather than by each household. Is
this as clear as mud here? :)

TIA,
Sandra
 
S

Sandra

Well Duh! Works like a charm...THANK YOU!!!
Now I have another question: I have a form using the
master table and a embedded subform of the AddName table.
PPID is the PK in the master table, but it is also a field
in the AddName table. I have a button to print the
current record, but somewhere my code is wrong.

docmd.OpenReport "PPOneEntry", acPreview,,"PPID = " &
me.PPID

brings up the error message: The specified field 'PPID'
could refer to more than one table listed in the FROM
clause of your SQL statement.

It would appear that I need a better pointer to the PPID
field in the master table, how would I do that?

Thanks again,
Sandra
 

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