Problem displaying Currency on form

K

kbrad

I have currency fields set up on my table (with the correct Currency format)
which I am retrieving and displaying on a form. Despite having the format set
to currency for the text boxes on the form displaying the prices, I am still
only seeing integers.
These prices are then output to another table and displayed from there on
another form which is showing the £ and decimal point fine - any ideas why
this is happening?
I am doing the initial retrieval using a combo box then using Me.CustPrice =
cmdFieldName.Column(6) to set up the field for output to the new table. Maybe
this needs some extra formatting?
 
6

'69 Camaro

Hi.
I am doing the initial retrieval using a combo box then using Me.CustPrice =
cmdFieldName.Column(6) to set up the field for output to the new table. Maybe
this needs some extra formatting?

Yes. The CustPrice text box is not a bound text box, so it doesn't have the
benefit of automatically being assigned a data type from the field's
properties. It's probably being assigned a Variant data type.

Ensure that the CustPrice text box Format Property is set to "Currency."
Change the VBA code assigning the value to the text box so that it's
explicitly the Currency data type. Try:

Me!CustPrice.Value = CCur(Nz(Me!cmdFieldName.Column(6), 0))

Depending upon where this value is assigned, you may need to use the form's
OnCurrent( ) event, the combo box's OnAfterUpdate( ) event, et cetera.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
K

kbrad

Many thanks - it was this bit I needed >> Me!CustPrice.Value =
CCur(Nz(Me!cmdFieldName.Column(6), 0))
 

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