Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing format of a number

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
0
0
FR
Hi,

I don't know if this is possible in a query, but I'll try it out:

I have a number, formatted like this: 1000,15489

Now I need to put this number in a table, but there the number needs to be formatted like this: 1000.155

How can I best achieve this, without changing my own regional settings?

Thanks in advance
 
Can you give a little clarification. In the example you are saying number. What you are showing is 2 numbers separatied by a comma. Is the field in you table a number or text?
In you desired outcome you show a number with 3 decimal places. Is the comma in the first a typo, and should be a period?

Alan
Senility at its finest
 
Hi,

actually the comma in the first example is the decimal sign. That's the way the region settings on my pc are set.

The result I desire would have a point as decimal sign, and 3 decimals.

The field in the table should be a text field I guess, since it would need to be formatted other than my regional settings.

Sorry if I wasn't clear in the first description ;-)

Thanks in advance
 
What regional setting are you using, I want to experiment?


Alan
Senility at its finest
 
Hey,

I'm using regional settings Dutch(Belgium). But the most important part is that on the number format I use a comma as decimal sign. The result I want would be a point as decimal sign (only for that field)
 
Is the field for display only? If so, try:
=Replace(Format([YourField],"0,00000"),",",".")
Your separators may vary.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
That would indeed do the job on an Access 2000(or later)-database. Unfortunately I'm dealing with an Access 97-db
 
You could write your own Replace() function or find one on the web.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top