Field Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top