cut off a number

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i have a table which has numbers in it for example

3256
2156
1234
5411

is there a way to cut off the first number in each like
the 3,2,1,5 and leave what is left?
 
The following will work if your numbers are all 4 digits
long: Mid([numfield],2,3)

It's starting at the 2nd position in the field, and
selecting 3, bypassing your first position.
 
now say i wanted to add a 1 in front of each one of those
numbers for example in front 256 and make it 1256
256
156
321
-----Original Message-----
The following will work if your numbers are all 4 digits
long: Mid([numfield],2,3)

It's starting at the 2nd position in the field, and
selecting 3, bypassing your first position.
-----Original Message-----
i have a table which has numbers in it for example

3256
2156
1234
5411

is there a way to cut off the first number in each like
the 3,2,1,5 and leave what is left?
.
.
 
Add 1000 to the number

YourField + 1000

Another method to drop the first digit of the number would be to use the mod operator

YourField Mod 1000
now say i wanted to add a 1 in front of each one of those
numbers for example in front 256 and make it 1256
256
156
321
-----Original Message-----
The following will work if your numbers are all 4 digits
long: Mid([numfield],2,3)

It's starting at the 2nd position in the field, and
selecting 3, bypassing your first position.
-----Original Message-----
i have a table which has numbers in it for example

3256
2156
1234
5411

is there a way to cut off the first number in each like
the 3,2,1,5 and leave what is left?
.
.
 
([YourNumber] MOD 1000) + 1000

should change the first digit to 1.
 

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