In access when datatype is numbers how do i get spaces inbetween .

G

Guest

When in access in design view and i change the data type to Numbers and then
i go into DataSheet View how do i get spaces inbetween the numbers that i
have entered and how can i put 0's before each number without it deleting the
0?
 
J

Joseph Meehan

Asta said:
When in access in design view and i change the data type to Numbers
and then i go into DataSheet View how do i get spaces inbetween the
numbers that i have entered and how can i put 0's before each number
without it deleting the 0?

Spaces are not numbers. 120 45 is not a number it is two numbers.

Displaying numbers with leading zeros is not difficult it is a format
property. You have to set it in the reports or forms you want to display
the data that way.

It sounds to me like this should be text not number type. If you want
variable formatting you want text. You can't add, subtract etc. text, but
you can't add 10 89 + 4548 1 and get anything.
 
B

Brendan Reynolds

You can't store either spaces or leading zeros in a numeric field. You can,
however, *display* the number with spaces and leading zeros, in queries,
forms and reports. For example ...

? format(123, "000 00")
001 23

Check out the format property and the Format function in the help file and
the online documentation for more details.
 

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

Top