format column result

R

redFred

Please help!

In the afterupdate event of a combo box I set an unbound control to the
value in column 2.

Me.txtCRAmtAdjusted = Me.cboClient.Column(2)


The control txtCRAmtAdjusted is unbound.

It's format is set in properties to Standard, 2 decimal.

However, the display is always 0 decimals.

BTW, the format is 2 decimal places in the combo box drop-down list.

How can I get this corrected?

Thanks in advance,
 
K

Ken Sheridan

If you want to include thousands separators:

Me.txtCRAmtAdjusted = Format(Me.cboClient.Column(2),"#,##0.00")

If not:

Me.txtCRAmtAdjusted = Format(Me.cboClient.Column(2),"0.00")

BTW if you do include thousand separators and then apply an arithmetical
operation to the value the result will not include thousands operators, so
would itself need to be formatted to do so.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top