[AccessD] Decimal point with no places to the right

Heenan, Lambert Lambert.Heenan at AIG.com
Thu Feb 5 08:19:57 CST 2009


Rocky,

Just tested this in Access 2002.

On a bound form, I set up a textbox bound to a double type field in a table. In the textbox's Format property I typed in just the two characters "0." - no quotes.

And that does the job. 111.12 displays as 111.

I then added a new record using the form and entered 1112.21 in the text box. That value was stored in the table, but on returning to the record, it displays as "1112."

Seems to fit the bill.

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at Beach Access Software
Sent: Wednesday, February 04, 2009 5:48 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Decimal point with no places to the right

Lambert:

In your example the 111.12 is the value to be displayed and should display 111. yes?

 But since this is a bound text box I'm not sure where to enter
format(111.12,"0.") and I'd have to substitute the bound field name for 111.12.  Right?

Thanks for hanging in there with me.


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
Sent: Wednesday, February 04, 2009 2:09 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Decimal point with no places to the right

Like this?

format(111.12,"0.")

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at Beach Access Software
Sent: Wednesday, February 04, 2009 5:07 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Decimal point with no places to the right

The field is a double but the user doesn't want the decimal places  to display.  The format example has the value and the mask as the two arguments for the format.  But in this case the value is in a bound text box on a continuous form.  So I can't use the Format on the control source.  So not sure how to get the text box to show the whole number plus the decimal point without the decimals fractions.


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
Sent: Wednesday, February 04, 2009 11:01 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Decimal point with no places to the right

? format(111&,"0.#")
111.

Too true. Works for integer types, though not sure if Rocky specified integers.
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, February 04, 2009 1:46 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Decimal point with no places to the right

Hi Lambert

> Your format string shows one decimal place (as I would expect it to)

Yes, but none for an Integer - that I understood was the issue.

/gustav

>>> Lambert.Heenan at aig.com 04-02-2009 19:23 >>>
Gustav? Your format string shows one decimal place (as I would expect it to) ? format(111.12,"0.#")
111.1

This shows no decimal places...
? format(111.12,"0.")
111.

Lambert

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list