Source language: Translate to:

Forcing Currency to Display with Trailing Zeros

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Forcing Currency to Display with Trailing Zeros

Postby Enigman » Mon Jan 20, 2014 11:44 pm

I am developing an app based on an Access database. I have setup the database directly in MS Access. I have two currency fields set to 2 decimal places.

No matter what I do to the data entered into those fields, if the number entered is an integer (whole dollar), the trailing zeros are wiped out. If I enter 2.1234, then it saves and displays 2.12 as expected. But if I enter 2.00 it saves and displays 2, without the zeros.

Does anyone know a way to force Access to save and display the trailing zeros, as in 2.00?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Forcing Currency to Display with Trailing Zeros

Postby Wrangler » Tue Jan 21, 2014 9:55 am

Look at dbpsetfieldproperties. The help file explains what mask to enter. I believe it's #.00.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Forcing Currency to Display with Trailing Zeros

Postby Enigman » Tue Jan 21, 2014 10:55 am

Wrangler wrote:Look at dbpsetfieldproperties. The help file explains what mask to enter. I believe it's #.00.

Knarly. That works. I missed that command entirely.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Forcing Currency to Display with Trailing Zeros

Postby Wrangler » Tue Jan 21, 2014 11:02 am

Yup. One for the snippet bank. :)
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron