FORMAT TEXT FIELD

  • Thread starter Thread starter Rony
  • Start date Start date
R

Rony

Hi
I am importing to access data base from csv file which contains data like
583 , 6875 ,45678 etc.
In access data base field is [CIF] , a text field , I need to store the data
as 7 digits
like 0000583 , 0006875 , 0045678 (in text only)
..
How I can manipulate format property of the table field of CIF

Thanks
Rony
 
Hi Rony,

"In access data base field is [CIF] , a text field"

you could either change the data type to Number (Long Integer) and use
this as the Format --> "0000000"

or, if you want to keep the data stored as text,
once data is imported, run an update query to pad the beginning with zeros

UPDATE [Tablename] SET [CIF] = Right("0000000" & [cif],7)


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
On Fri, 23 Jan 2009 02:05:02 -0800, Rony

A better approach would be to store the data as numbers, and then
format these numbers to 7 digits when you display or print them.

-Tom.
Microsoft Access MVP
 
Back
Top