input a comma after 2 digits

A

alex

Beginner here

i have for example this column in Acces
'439965
'23112
and I want to put a comma after the first 2 digit
and look like this. I dont mind creating a new colum
'43,9965
'23,112
 
J

Jeff Boyce

Alex

Bear in mind that the number 439965 needs its comma after 3 digits, where
23112 needs a comma after 2 ...

Now, if those aren't really NUMBERS (things you do math on), but just
characters that happen to be digits, that's a different matter.

You can check Access HELP for the use of the Left() and Mid() functions to
grab the first two characters. If you use a query, you can concatenate the
first two, a comma, and the remainder into a new field.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

Jeff Boyce

A secondary thought -- you really don't need (or want) to store two copies
of (essentially) the same value. What you describe sounds more like an
issue of formatting (what it looks like on display) than what you actually
store in the database.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
A

Alex

these are actually coordinates so i just need to put put a "." or a "," after the first two digits, no mater how many numbers i have after. But the 'left' function i think will do the trick. thank you!
 
G

Guest

alex said:
Beginner here!

i have for example this column in Access
'439965'
'23112'
and I want to put a comma after the first 2 digits
and look like this. I dont mind creating a new column
'43,9965'
'23,112'
 
G

Guest

alex said:
Beginner here!

i have for example this column in Access
'439965'
'23112'
and I want to put a comma after the first 2 digits
and look like this. I dont mind creating a new column
'43,9965'
'23,112'
 
G

Guest

alex said:
Beginner here!

i have for example this column in Access
'439965'
'23112'
and I want to put a comma after the first 2 digits
and look like this. I dont mind creating a new column
'43,9965'
'23,112'
 
G

Guest

Jeff Boyce said:
Alex

Bear in mind that the number 439965 needs its comma after 3 digits, where
23112 needs a comma after 2 ...

Now, if those aren't really NUMBERS (things you do math on), but just
characters that happen to be digits, that's a different matter.

You can check Access HELP for the use of the Left() and Mid() functions to
grab the first two characters. If you use a query, you can concatenate
the first two, a comma, and the remainder into a new field.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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