How do I combine first and last name to create a unique record?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created two tables, multiple queries and multiple associated reports.
When I currently run a report I have to differentiate last names (Smith1,
Smith2, etc) for my reports to collect data properly. If I could some how
combine both first and last name to create a unique identifier ( I do not
have a situation where both first and last names are the same) my reports
would print out Smith instead of Smith1.

I used the Access Wizard to reate my Tables, Queries and Reports and have an
extremely limited knowledge of SQL.

Any help would be greatly appreciated.
 
"Summing and Grouping data in a Report"
I have created two tables, multiple queries and multiple associated
reports.
When I currently run a report I have to differentiate last names (Smith1,
Smith2, etc) for my reports to collect data properly. If I could some how
combine both first and last name to create a unique identifier ( I do not
have a situation where both first and last names are the same) my reports
would print out Smith instead of Smith1.

I used the Access Wizard to reate my Tables, Queries and Reports and have
an
extremely limited knowledge of SQL.

In your table design, select both first and last name fields then click the
Primary Key
icon. The PK will be made up of both fields. Of course you'll have to
delete any
current PK and redefine your relationships.

Tom Lake
 
Tom Lake said:
"Summing and Grouping data in a Report"


In your table design, select both first and last name fields then click the
Primary Key
icon. The PK will be made up of both fields. Of course you'll have to
delete any
current PK and redefine your relationships.

Note, though, that at some point soon, you doubtlessly WILL have records
with the same first name and last name. You may want to think of something
else that you can use now, rather than waiting until then.
 
If I could some how
combine both first and last name to create a unique identifier ( I do not
have a situation where both first and last names are the same)

And you can be *absolutely certain* that you never will?

Names *simply are not unique*. I know three gentlemen named Fred
Brown, and they all live in a small town.

Simply use a unique PersonID as the grouping field; then you can have
multiple Smiths, or even multiple Dave Smiths, without interfering
with your grouping.

John W. Vinson[MVP]
 
Eventually, you will have 2 or more "Joe Smith"s, then 2 or more Joe Q
Smith"s, etc. Try adding an autonumber primary key.
 
Back
Top