Can someone please tell me what i am doing wrong here:
Code:
Me.LstItemList.RowSourceType = "Table/Query"
Me.LstItemList.RowSource = ("SELECT ITEM.ItemName AS [ITEM / ARTICLE], FORMAT(Item.ItemPrice, "¢ #,##0.00") AS PRICE, SaleTransDetail.QtyOrdered AS QTE, FORMAT([ItemPrice]*[QtyOrdered], "¢ #,##0.00") AS [COST]" & _
" FROM SaleTransaction INNER JOIN (ITEM INNER JOIN SaleTransDetail ON ITEM.ItemID_PK = SaleTransDetail.ItemID_FK) ON SaleTransaction.SaleTransID_PK = SaleTransDetail.SaleTransID_FK" & _
" WHERE SaleTransaction.ClientTableID_FK=" & Me.ClientTableID_FK & _
" ORDER BY Item.ItemName ")
Me.LstItemList.Requery
The code works just fine without the FORMAT function. But once i add it the line become red.
Am i missing something? Or this is not the right way to use the FORMAT function?
NB: I am only trying to format the price and the cost fields to match a specific currency format.
Thanks in advance.