Decimal point in Report Expression (1 Viewer)

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
Hi all,

I have a text box with the following expression:

Code:
=IIf([ENT_Mailbox]>=0,[ENT_MailboxRate],"")

The data is entered as 4.25, 5.0, 6.5 and so on in the ENT_MailboxRate.
However, I can't figure out what to put in Format or Decimal Places to the number comes out the way it was entered.

I have tried various combinations. Numbers like 4.25 come out as 4 or 4.0 in the various scenarios I tried.

Anyone as a solution? THANK YOU!
 

JHB

Have been here a while
Local time
Today, 21:21
Joined
Jun 17, 2012
Messages
7,732
What field type is ENT_MailboxRate?
 

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
Thank you for answering!! The ENT_MailboxRate correspond to the hourly rate charged to repair or paint or... the mailbox.

In the table, the field =

Size: Double
Format: General Number
Decimal Places: 2

And it works fine in a report if I don't need to insert it into an expression, which I do.

Hope these were the answers you would looking for...
 

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
Created a new text box, re-keyed the expression - left Format blank and decimal place at Auto. It returns 4. Should return: 4.25. Am I missing something from your suggestion?

FYI: using MS Access 2010
 

JHB

Have been here a while
Local time
Today, 21:21
Joined
Jun 17, 2012
Messages
7,732
Could you post a stripped down version of your database, a table with a few sample data in it, and the report.
 

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
I will try - it is a large database. TY
 

JHB

Have been here a while
Local time
Today, 21:21
Joined
Jun 17, 2012
Messages
7,732
Then create a new database and put in a table with some sample data and a report.
 

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
Here is a sample. The data in the table is 4.25 but shows as 4 in the report. Thank you!
 

Attachments

  • Decimals.accdb
    504 KB · Views: 56

JHB

Have been here a while
Local time
Today, 21:21
Joined
Jun 17, 2012
Messages
7,732
The problem is you've "forgotten" the values you've in the table and which conditions you've set up.
 

Attachments

  • Decimalpoint.jpg
    Decimalpoint.jpg
    91.5 KB · Views: 196

Valery

Registered User.
Local time
Today, 12:21
Joined
Jun 22, 2013
Messages
363
How stupid of me! Thought the 4.25 was coming out as 4. Very sorry - super thank you for looking into this and figuring it out!
 

Users who are viewing this thread

Top Bottom