Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2004, 11:32 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default format total number..not working

hi..
how can i format this number let say 10000 to 100.00 (hundred)
i have 3 colum price,quantity and total.

in my price's colum value= 100.00 (text) quatity = 1 total =total*quatity and access give me this value 10.000

someone suggest me this:
Total: Format([Quantity]*[book.book_price];'0.00')
but when i applied it access rewrite it to this:

Total: Format([Quantity]*[book.book_price];'#.000')
and yet the value is still 10.000,actually it is hundred.(100.00)
can anyone help me?




 
Old February 18th, 2004, 03:44 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

The datatype for Price should not be Text; it should be Currency. The datatype for Quantity should be Integer or Long (depending on the max number of items one can order). When you multiply Price and Quantity, the product should also be Currency.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old February 19th, 2004, 11:08 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh..ic but if i use currency for price,can i make it look like this 100.00 for hundred?that's why i used text as data type.

 
Old February 19th, 2004, 11:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

If you specify datatype currency, the value will always come out as $100.00 when you see it on a form or report.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old February 21st, 2004, 03:36 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

now i see... can $ sign be remove meaning i want to use RM instead of $ because i'm from Malaysia.Sorry if this question looks like silly question.
tq.

 
Old February 23rd, 2004, 09:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Actually, there may not be a dollar sign there for you. If your Windows regional settings (you can get to there from your control panel) is set for Malaysian, then the currency should default to whatever your currency is. If that is true, then you will see your currency, not a dollar sign.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
adding up a whole colum to give a total number KeviJay VB Databases Basics 2 May 29th, 2008 08:15 AM
total number of rows in a recordset lian_a Classic ASP Basics 2 February 8th, 2005 08:13 AM
count the TOTAL number of segments crmpicco Classic ASP Basics 2 February 1st, 2005 05:03 AM
format total Adam H-W Classic ASP Basics 2 September 27th, 2004 09:55 AM
How to count total number of nodes in an xml file? nimesh XSLT 1 August 12th, 2004 03:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.