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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox/Datalist Dataformat

Status
Not open for further replies.

mickallen

Technical User
Jan 5, 2001
39
GB
I'am populating a Listbox and Datalist with prices from an Access database.
My problem is that I cannot get the prices to display in the currency format.
I have set the DataFormat Property to Currency but this has no affect.
I have populated the Listbox using a data control and with code just to check to see one way would work better than the other, but I can't display the currency correctly no matter which way I try.

Here is the code I used.

Do While Not Records.EOF
Price.AddItem Records("Price")
Price.ItemData(In_Stock.NewIndex) = Records("Stock_Code")
Records.MoveNext
Loop

Can any one help!!!
 
Try formatting prior to adding to the list:

Code:
    Price.AddItem format(Records("Price"), "currency")

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top