Cell generated from other cell values

R

RichHoughton

Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
R

Rick B

Cell? Are you using access or excel? Cell is an Excel term. This
newsgroup is for questions about Access.

If you are using access, you would do this in a query, report, or form. Let
us know where you are doing it, and what your field names are, and we can
tell you how to build it.
 
O

Ofer

In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]
 
R

RichHoughton

Thanks Rick. Yes it is Access, sorry for the confusion. Field names are
"Date", "Sex", "Name" and "ID".


Ofer said:
In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]


--
I hope that helped
Good luck


RichHoughton said:
Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
O

Ofer

I gave you the answer for a form or a report, for another column in a query
try this

Select [Date], [Sex], [Name] ,[ID] , [Date] & [Sex] & [Name] & [ID] as
CombineField From TableName

I would advice changing names of the field that are key words in access,
such as date.
It will be OK as long that they are in []
--
I hope that helped
Good luck


RichHoughton said:
Thanks Rick. Yes it is Access, sorry for the confusion. Field names are
"Date", "Sex", "Name" and "ID".


Ofer said:
In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]


--
I hope that helped
Good luck


RichHoughton said:
Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
R

RichHoughton

What i ultimately wish to achieve is that the new ID code is entered into my
table, column 4(the ID one) in the corresponding row that it was generated
from. Eg row 1 - Column 1 = 21/09/2005, column 2 = M, Column 3 = SMITH,
column 4 = 21092005MSMITH.

Hopefully this makes more sense. I'm not sure how the bound control thing
would enter that ID into my table? Sorry for being slow on this.

Thanks again

Rich

RichHoughton said:
Thanks Rick. Yes it is Access, sorry for the confusion. Field names are
"Date", "Sex", "Name" and "ID".


Ofer said:
In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]


--
I hope that helped
Good luck


RichHoughton said:
Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
R

RichHoughton

Thanks Ofer. I've got it :)

Ofer said:
I gave you the answer for a form or a report, for another column in a query
try this

Select [Date], [Sex], [Name] ,[ID] , [Date] & [Sex] & [Name] & [ID] as
CombineField From TableName

I would advice changing names of the field that are key words in access,
such as date.
It will be OK as long that they are in []
--
I hope that helped
Good luck


RichHoughton said:
Thanks Rick. Yes it is Access, sorry for the confusion. Field names are
"Date", "Sex", "Name" and "ID".


Ofer said:
In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]


--
I hope that helped
Good luck


:

Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
R

Rick B

You don't store calculated fields in a table. It is redundant. If you
change one of the fields, what would prompt the 'id' to be updated as well.

For more details, read the hundreds of previous posts on "storing
calculated" data.


--
Rick B



RichHoughton said:
What i ultimately wish to achieve is that the new ID code is entered into my
table, column 4(the ID one) in the corresponding row that it was generated
from. Eg row 1 - Column 1 = 21/09/2005, column 2 = M, Column 3 = SMITH,
column 4 = 21092005MSMITH.

Hopefully this makes more sense. I'm not sure how the bound control thing
would enter that ID into my table? Sorry for being slow on this.

Thanks again

Rich

RichHoughton said:
Thanks Rick. Yes it is Access, sorry for the confusion. Field names are
"Date", "Sex", "Name" and "ID".


Ofer said:
In the control source of the forth field write

=[DateFieldName] & [SexFieldName] & [NameFieldName]


--
I hope that helped
Good luck


:

Hello

What i am trying to achieve is a cell whose content is auto-generated from
the values in other cells. I have columns holding date (in format
dd/mm/yyyy), another with sex (m or f) and a final one with name, eg SMITH.
What i then want in another column is an amalgamation of these cells to
generate a code. For example for the entries; 21/09/2005, M, SMITH the next
column will generate the value 21092005MSMITH.

Can this be done? Any help or pointers where to look would be greatfully
received.

TIA

Rich
 
Top