Report shows one person when there are 2

  • Thread starter Thread starter Cassie
  • Start date Start date
C

Cassie

I have a report that supposed to pick up a customer's
information when you enter their last name in the
parameter's box. However, if I have 2 people with the same
last name, only one record appears and it combines the
notes of both customers. How do I tell Access to pull all
records with that last name?
 
When you created the customer data table you probably were
prompted to create a primary index (key index). The notes
table should be related to the primary key, not the last
name. When you than enter a name in the list box, you
would infact select not only the last name but also the
unique index identifier. This than would make sure you
print only the data pertaining to the one specific
customer.
Hope this gets you going in the right direction.
Fons
 
I think I understand what you're saying, but I'm still not
clear on how to fix the problem. How do I make Access pull
up 2 individual customers with the same name and keep
their notes with the corresponding customer.

Thanks,

Cassie
 
I think I understand what you're saying, but I'm still not
clear on how to fix the problem. How do I make Access pull
up 2 individual customers with the same name and keep
their notes with the corresponding customer.

Thanks,

Cassie
In the Report's RecordSource query, code the criteria for the
CustomerName field:
[Enter Customer Name]

The query will return all companies whose name EXACTLY matches the
input name. (If you want companies with a similar name, i.e. "Smith
Construction" and "Smith and Sons", use:
Like [Enter Start of Name] & "*"

In the Report Design View, click on View + Sorting and Grouping.
Add a Group Header for the [CompanyID] field.

In the header, you can place the [CompanyName] field to display the
actual company name instead of, or in addition to, the [CompanyID].

The report will then return only records for companies named "Smith
Construction", but "Smith Construction" in Virginia and "Smith
Construction" in California will be in separate groups. If you
additionally want each group to print on a separate page, set the
Group's ForceNewPage property to Before Section.
Hope this helps.
 
Cassie.
Do you use a query as the source for your report?
Your report should be grouped by the unique identifier for
the customer, not by the last name.
Than in the group header or in the detail section you can
put the names(s) and other data from the customer and only
in the detail would you put the note(s).
Now when you print(or preview) the report you will see the
customer data followed by the customer's note(s) this
would still be for each of the customers with the same
last name unless you apply what I wrote in the earlier
message.
If this is not clear, give me some specififc information
such as the table structure(s) and the query sql.
Hope this helps.
Fons
 
Cassie said:
I have a report that supposed to pick up a customer's
information when you enter their last name in the
parameter's box. However, if I have 2 people with the same
last name, only one record appears and it combines the
notes of both customers. How do I tell Access to pull all
records with that last name?
It sounds like you have your report group set by last name only, so Access
groups both employees by the common last name. In your report query, create
a field that has both last and first name concatenated together (i.e.
FullName: [Last] & ', ' & [First] and use a separator to prevent an
accidental mismatch to a longer last name), then group on that field instead
of last name.
Jack Peacock
 
Yes. I use a query as the source of my report.
Oh... I think I get you now. I'll give it a shot.

Thanks!
 
Thanks, Jack. I'll give it a try!

Cassie
-----Original Message-----
I have a report that supposed to pick up a customer's
information when you enter their last name in the
parameter's box. However, if I have 2 people with the same
last name, only one record appears and it combines the
notes of both customers. How do I tell Access to pull all
records with that last name?
It sounds like you have your report group set by last name only, so Access
groups both employees by the common last name. In your report query, create
a field that has both last and first name concatenated together (i.e.
FullName: [Last] & ', ' & [First] and use a separator to prevent an
accidental mismatch to a longer last name), then group on that field instead
of last name.
Jack Peacock


.
 
Back
Top