Format property (1 Viewer)

radek225

Registered User.
Local time
Today, 09:29
Joined
Apr 4, 2013
Messages
307
In my form:
If I want to have cubic meter format of my control, then I type
Code:
&" m³"

if I want to have thousands separator then I type
Code:
# ###

How should format look like for cubic meter control and thousands separator. In addition, this control should has three decimal places, but only when decimal places aren't null e.g.
If I have 231 should display 231 not 231,000
if I have 231,23 should display 231,23 not 231,230
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
19,246
i think you can't specially if your form is continuous.
 

Ranman256

Well-known member
Local time
Today, 12:29
Joined
Apr 9, 2015
Messages
4,337
i wouldnt put the meter symbol IN the format, instead just put it as a label outside the box.

not sure access can do a NO COMMA format.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
19,246
there is none, all records will take the same format.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
19,246
just use the Format property of the control:

Format: #,###" m³"
 

radek225

Registered User.
Local time
Today, 09:29
Joined
Apr 4, 2013
Messages
307
just use the Format property of the control:

Format: #,###" m³"

It's fine for me. Could you tell me how should I set it using VBA?
When I do
Code:
Me.WolumenSumaryczny.Format = "# ###" & "," & "####" & " MWh"
then get something like
Code:
#\ # ###" MWh"

:/
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
19,246
Me.WolumenSumaryczny.Format ="#,##0 \M\W\h"
 

Users who are viewing this thread

Top Bottom