Leading 0's Number Format

  • Thread starter RedHeadedMonster via AccessMonster.com
  • Start date
R

RedHeadedMonster via AccessMonster.com

I have an item in a table that is a number, I have the number format stored
as 0001, for example. It is a tracking number of changes and it increments
everytime a new change is added to the DB. The number works fine, format
works fine, until I concatenate it with another field. When I do that I get

test-1 Instead of test -0001

Anyone know of a way to keep the format when concatenating it with another
field.

Thanx!

RHM
 
K

Klatuu

First, your number is not stored as 0001. It is stored as 1. The format
property of the field only identifies how it should be presented visually.
The Format property, in other words, has no effect on how the data is
stored.

Use the Format function to get the value you need:

= "test-" & Format(MyNumber, "0000")
 

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