Showing posts with label formuladbo. Show all posts
Showing posts with label formuladbo. Show all posts

Wednesday, March 21, 2012

formatting numbers

I am using a MS Access ADP connected to SQL Server Data

In a view I have the following formula:

dbo.tblQuoteItem.Cost + dbo.tblQuoteItem.Markup * dbo.tblQuoteItem.Cost * .01

this calculates cost + markup

I cannot get it to format in Currency

Ex:

Cost is $1.75
Markup is 2.00 (2%)
Total shows - 1.785000

I want $1.78

Also - I am using this formula to calculate the Quoted price for the Qty Entered

dbo.tblQuoteItem.Qty * dbo.tblQuoteItem.Cost + dbo.tblQuoteItem.Markup * dbo.tblQuoteItem.Cost * .01

Using a Qty of 2 for above, I get 3.535000

I want $3.53

Any help is appreciated - ABSQL Server does not format output. That is the job of your interface (Access ADP, in this case).

Set the format of your form control or report field to display as currency.|||you could something like SELECT CAST(3.5553 as decimal(10,2)) but this rounds up (3.56). I would handle this in your VBA with a formatcurrency('your variable here',2).

This might round too. Or it might just cut off your percision. I forget. Test.