data format problem from access through vb6

hi
i am using vb6 with ms acces 2003. i have a field in database with data type "NUMBER" format "CURRENCY" and decimal places "3". in access data is shown with currency symbol and with accurate decimal places.
Problem is , when i try to show the data in a textbox, it just truncate the last zero.
suppose if amount is "23.230" , it shows "23.23".
i have set the data formate property of text box to "CURRENCY".
I CHECKED by putting beak point where recoredset is assigining value to textbox like this

textbox1.text=rs![myamount], it is showing value "23.23" over there as well.
so may be its record set problem or text box.

could please any body guide me for this.

thanks and regards.
raza
hellorazaAsked:
Who is Participating?
 
Wayne Taylor (webtubbs)Connect With a Mentor Commented:
The field in the database has it's format set to *display* 3 decimals, but they are not stored that way. They are stored as numbers, without the trailing zeros.
0
 
Wayne Taylor (webtubbs)Commented:
To display any number with a trailing zero, you need to convert it to a string....

    textbox1.text=Format(rs![myamount], "$#,##0.000")

Wayne
0
 
hellorazaAuthor Commented:
thanks

but i was thinking to display as many zeros as the data have, only wondering why it does not show zeros if they are present in database field?

thanks for your reply anyway.
regards.
raza
0
 
hellorazaAuthor Commented:
ok
got it.
many thanks for prompt reply.
ragards.
raza

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.