Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format the data in a column

Status
Not open for further replies.

yuchieh

MIS
Jul 21, 2000
178
US
I have two columns in a table. Column1 is people's last name and Column2 is the first letter of the name in Column1. For now, we manually insert the first letter into Column2. Is there a way to do the function format, such as
Left(Column1, 1), for Column2? So that when we insert the name in Column1, the first letter can be inserted into Column2 automatically.

Thank you.
 
It sounds to me like you already have the solution.
Column 2 can be quickly and easily calculated useing the exact formula you provide. This leads to the question why have column 2 at all.
 
I put "=Left("Column1, 1")" in the default value box in the design view for Column2. But it didn't work; the result shows "C" for all records. That means it literally takes the word "Column1". What did I do wrong?

I need the column2 because I need the data in there for Cold Fusion coding.

Thanks.
 
gave me an error
"doesn't recognize the field in a validation expression or the default value in the table"

??
 
create an Update Query

Add one field to the Query, Column2 from your table

Add this to the row for Update To:

Left([Column1],1)

This should update the data for you, providing Column1 and Column2 are the correct Field names.

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top