Create Initials

D

Dimitris

Hello, I have a table in which there are fields with personal information.
One of the fields named FN contains the Father Names. There is also a field
named IN. What I need is to have only the first letter of each record from
the field FN to the field IN. For example if a record in the field FN has
"John" I need the letter "J" in the IN field. The table has already 5000
records so I need to find a way to do this.

If you can help me please give me detailed instructions because I am a
newbie.
Thank you
Dimitris
 
J

John Spencer

Use an update query and the Left function as in

UPDATE YourTable
SET IN = Left([FN],1)
WHERE FN is Not Null

In the query grid (Design view)
-- Add your table to the query
-- Add the IN field to the query
-- Add the FN field to the query
-- Enter Is Not Null in the criteria under FN
-- SELECT Query: Update from the menu
-- Enter "Left([FN],1)" (no quote marks) in the Update to under IN
-- SELECT Query: Run from the menu

WARNING: Back up your data first. If you make a mistake there is no ability
to undo the changes.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
F

fredg

Hello, I have a table in which there are fields with personal information.
One of the fields named FN contains the Father Names. There is also a field
named IN. What I need is to have only the first letter of each record from
the field FN to the field IN. For example if a record in the field FN has
"John" I need the letter "J" in the IN field. The table has already 5000
records so I need to find a way to do this.

If you can help me please give me detailed instructions because I am a
newbie.
Thank you
Dimitris

Why do you need an [IN] field in the table?

As long as you already store the [FN] field, any time you wish to use
the FN initial, compute it, using:

=Left([FN],1)
 
Top