Field Format

E

Edgar Thoemmes

I have a table which contains a field ISBN number like so 1855063212. I want
the format of the field to look like 1 85506 321 2 in all my reports, queries
and forms.

Can someone help?
 
F

fredg

I have a table which contains a field ISBN number like so 1855063212. I want
the format of the field to look like 1 85506 321 2 in all my reports, queries
and forms.

Can someone help?

If the data is always exactly 10 digits:
Use an Unbound text control.
=Format([FieldName],"@ @@@@@ @@@ @")

A better solution might be to use an Update query to permanently
change the data to the format desired.
Change the datatype of the field to Text (if it not already Text).
Then:

Update YourTable Set YourTable.[FieldName] =Format([FieldName],"@
@@@@@ @@@ @");

Now you can use the field as is.
Make sure you have taken steps to assure that new data is entered with
this new format.
 
Top