Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBGrid display currency values

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
0
0
US
I have an Access database displayed in a DBGrid. The Access file has two currency fields that display as $xx.xx in Access but only display as xx in the DBGrid. How can I get these currency values to display as $xx.xx in the DBGrid?
 
Try to double-click on the DataSet component of your table to open the Fields Editor window, select the field, open the Object Inspector (F11) and set the Currency property to true.

I hope this helps.


Imoveis comerciais em Guarulhos
 
I do not see a Currency property in the ADOTable or in the DBGrid columns listing.
 
Try to double-click on the ADOTable to open the Fields Editor window.
If the window is empty, right click on the window, and then click "Add all fields".
Select the currency field, open the Object Inspector (F11) and set the Currency property to true.

I hope this helps.


Imoveis comerciais em Guarulhos
 
You can force the display format of a field after you open the table:

Code:
TFloatField(YourTable.FieldByName('YourField').DisplayFormat := '0.00';
 
Problem solved. Thanks for all of your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top