Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Remove decimal and leave 00

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 18 Nov 2005 18:16 GMT
How do I remove the decimal point from fixed numbers but leave the double
zero after the decimal.  Currently I am using the Replace() command but if
there are two zeros after the decimal it drops them; I need them to remain.

Currently
495.25 = 49525
495.00 = 495

Need
495.00 = 49500

Thanks,
Scott
[MVP] S.Clark - 18 Nov 2005 18:29 GMT
Multiply by 100... or am I missing something?????

Signature

Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

> How do I remove the decimal point from fixed numbers but leave the double
> zero after the decimal.  Currently I am using the Replace() command but if
[quoted text clipped - 10 lines]
> Thanks,
> Scott
Scott - 18 Nov 2005 19:36 GMT
That would work for the 495.00, changing it to 49500 but it wouldn't work for
the 495.25, changing it to 4952500.

Scott

> Multiply by 100... or am I missing something?????
>
[quoted text clipped - 12 lines]
> > Thanks,
> > Scott
Tom Lake - 18 Nov 2005 19:41 GMT
> That would work for the 495.00, changing it to 49500 but it wouldn't work
> for
> the 495.25, changing it to 4952500.

Int([yournumber]) * 100

Tom Lake
John Spencer - 18 Nov 2005 20:29 GMT
495.25 * 100 = 49525

In other words, don't strip out the decimal point before you multiply.

> That would work for the 495.00, changing it to 49500 but it wouldn't work
> for
[quoted text clipped - 20 lines]
>> > Thanks,
>> > Scott
Scott - 18 Nov 2005 20:41 GMT
Thank you, that worked!

> 495.25 * 100 = 49525
>
[quoted text clipped - 24 lines]
> >> > Thanks,
> >> > Scott
[MVP] S.Clark - 21 Nov 2005 23:45 GMT
I'm confused at how him telling you to multiply by 100 was different than me
telling you to multiply by 100.
::Shrug::

> Thank you, that worked!
>
[quoted text clipped - 28 lines]
>> >> > Thanks,
>> >> > Scott
Tom Ellison - 22 Nov 2005 02:33 GMT
You might also want to be curious that this is the right answer.  In the
original post, he said that if the value was 495.00 he wanted to see 495,
not 49500.  It's all very confusing to me!

I would have thought the answer would be to format the thing to two places,
then strip the trailing zeros, then remove the decimal point.

Tom Ellison

> I'm confused at how him telling you to multiply by 100 was different than
> me telling you to multiply by 100.
[quoted text clipped - 32 lines]
>>> >> > Thanks,
>>> >> > Scott
John Spencer - 22 Nov 2005 12:56 GMT
Dear Tom,

So, I'm not the only one that misreads posts.

In the first post the OP said he/she was getting 495, but wanted to get
49500.

Quote
Currently
495.25 = 49525
495.00 = 495

Need
495.00 = 49500
End Quote

> You might also want to be curious that this is the right answer.  In the
> original post, he said that if the value was 495.00 he wanted to see 495,
[quoted text clipped - 42 lines]
>>>> >> > Thanks,
>>>> >> > Scott
Tom Ellison - 22 Nov 2005 21:00 GMT
Dear John,

LOL!  Well, at least I had enough sense not to post!

Tom

> Dear Tom,
>
[quoted text clipped - 59 lines]
>>>>> >> > Thanks,
>>>>> >> > Scott
Marshall Barton - 18 Nov 2005 18:45 GMT
>How do I remove the decimal point from fixed numbers but leave the double
>zero after the decimal.  Currently I am using the Replace() command but if
[quoted text clipped - 6 lines]
>Need
>495.00 = 49500

Replace(Format(numberfield, "0.00"), ".", "")

Signature

Marsh
MVP [MS Access]

John Vinson - 18 Nov 2005 19:34 GMT
>How do I remove the decimal point from fixed numbers but leave the double
>zero after the decimal.  Currently I am using the Replace() command but if
[quoted text clipped - 9 lines]
>Thanks,
>Scott

Replace() works on text fields. If this is a Number, just multiply it
by 100 rather than replacing the decimal point.

                 John W. Vinson[MVP]    
Scott - 18 Nov 2005 19:52 GMT
That was simple!  

Thank you,
Scott

> >How do I remove the decimal point from fixed numbers but leave the double
> >zero after the decimal.  Currently I am using the Replace() command but if
[quoted text clipped - 14 lines]
>
>                   John W. Vinson[MVP]    
Van T. Dinh - 18 Nov 2005 21:40 GMT
Of course, it is simple.

It is primary school maths, after all!

Signature

Van T. Dinh
MVP (Access)

> That was simple!
>
> Thank you,
> Scott
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.