can i concatenate in access

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

Guest

can I create a field in a table which pulls the data from two other fields in
the table (in the way that the concatenate function in Excel works)?
 
You shouldn't store a concatenated value in a table. Use a query or other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]
 
It's just that I want the amalgamation of the 2 fields to be my primary key.
Field 1 can have duplicates and field 2 can have duplicates but the 2 fields
together would be unique.

Duane Hookom said:
You shouldn't store a concatenated value in a table. Use a query or other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]

--
Duane Hookom
MS Access MVP
--

shazzer said:
can I create a field in a table which pulls the data from two other fields
in
the table (in the way that the concatenate function in Excel works)?
 
You can specify more than one field as the primary key (or unique index).

--
Duane Hookom
MS Access MVP
--

shazzer said:
It's just that I want the amalgamation of the 2 fields to be my primary
key.
Field 1 can have duplicates and field 2 can have duplicates but the 2
fields
together would be unique.

Duane Hookom said:
You shouldn't store a concatenated value in a table. Use a query or other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]

--
Duane Hookom
MS Access MVP
--

shazzer said:
can I create a field in a table which pulls the data from two other
fields
in
the table (in the way that the concatenate function in Excel works)?
 
Duh! I didn't realise that. Thanks Duane.

Duane Hookom said:
You can specify more than one field as the primary key (or unique index).

--
Duane Hookom
MS Access MVP
--

shazzer said:
It's just that I want the amalgamation of the 2 fields to be my primary
key.
Field 1 can have duplicates and field 2 can have duplicates but the 2
fields
together would be unique.

Duane Hookom said:
You shouldn't store a concatenated value in a table. Use a query or other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]

--
Duane Hookom
MS Access MVP
--

can I create a field in a table which pulls the data from two other
fields
in
the table (in the way that the concatenate function in Excel works)?
 
How do you do that? When I try the key just jumps from one field to the next.
TIA

shazzer said:
Duh! I didn't realise that. Thanks Duane.

Duane Hookom said:
You can specify more than one field as the primary key (or unique index).

--
Duane Hookom
MS Access MVP
--

shazzer said:
It's just that I want the amalgamation of the 2 fields to be my primary
key.
Field 1 can have duplicates and field 2 can have duplicates but the 2
fields
together would be unique.

:

You shouldn't store a concatenated value in a table. Use a query or other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]

--
Duane Hookom
MS Access MVP
--

can I create a field in a table which pulls the data from two other
fields
in
the table (in the way that the concatenate function in Excel works)?
 
While the table's open in Design view, hold down the Ctrl key while click on
the "gutter" to the left of each of the fields you want in the PK. That
should highlight the fields. Once that's done, then click on the Key to set
the primary key.

The other option is to work through the Indexes dialogue.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


FBrnstrmr said:
How do you do that? When I try the key just jumps from one field to the
next.
TIA

shazzer said:
Duh! I didn't realise that. Thanks Duane.

Duane Hookom said:
You can specify more than one field as the primary key (or unique
index).

--
Duane Hookom
MS Access MVP
--

It's just that I want the amalgamation of the 2 fields to be my
primary
key.
Field 1 can have duplicates and field 2 can have duplicates but the 2
fields
together would be unique.

:

You shouldn't store a concatenated value in a table. Use a query or
other
means to display two field concatenated together like:

FullName: FirstName & " " & LastName
or a control source of
=[City] & ", " & [State] & " " & [Zip]

--
Duane Hookom
MS Access MVP
--

can I create a field in a table which pulls the data from two
other
fields
in
the table (in the way that the concatenate function in Excel
works)?
 
Back
Top