tables

  • Thread starter Thread starter Nandini
  • Start date Start date
N

Nandini

One table (Employee) is created having 6 fields. 2 fields of them are Last
name and first name. Another table (Employee1) is created having some fields.
One of them is FullName. I want, the 2nd table will get data for that field
from the 2 fields of the 1st table automatically. How its possible? Please
help me.
with best regards,
 
Why store the same data redundantly? Just put a field in the Employee1 table
that links it to the correct record in Employee table, and then you can use
a query to display the full name using the fields from Employee.
 
One table (Employee) is created having 6 fields. 2 fields of them are Last
name and first name. Another table (Employee1) is created having some fields.
One of them is FullName. I want, the 2nd table will get data for that field
from the 2 fields of the 1st table automatically. How its possible? Please
help me.
with best regards,

Why?
What then will happen if Mary Smith gets married and changes her name
to Mary Jones? You now have one table with the correct new name and
one table with the old, incorrect, full name.

As long as you have the name correctly entered in the 2 fields in
able1, and the record has a unique record ID (as it should), any time
you ned the full name, concatenate it, in a query, joining the
Employee table RecordID field with the Employee1 table RecordID field,
and concatenating the 2 names:
FullName:[Employee].[FirstName] & " " & [Employee].[LastName]

You could also do this directly in a form or report control.
=DLookUp("FirstName]","Employee","[RecordID] = " & Me.[RecordID])

Change [RecordID] to whatever the actual unique key field name.
The above code assumes [RecordID] is a Number datatype.
If, in fact, it is a Text datatype, then use:

=DLookUp("FirstName]","Employee","[RecordID] = """ & Me.[RecordID] &
"""")
Never store duplicate data.
 
Back
Top