Combo box currency formatting

vicissitude

Registered User.
Local time
Today, 11:06
Joined
Feb 28, 2010
Messages
92
I have 1 text box and one combo box

I want the combo box row source to be equal to the text box value

So in the got focus event of the combo box i put in the code

Code:
Invoice_Amount.RowSourceType = "Value List"
Invoice_Amount.RowSource = Format(Nz(Cost), "Currency")


where cost is the name of the text box (formatted to currency)

This works fine until the text box contains a value over £1000. In the text box it formats it into £1,000. So if the text box contains for example £2,500.49 the combo box dropdown has:

£2
500.49

in 2 rows.

Any help would be much appreciated.
 
INCREASE the Combo Box field. (Column Widths properties).
 
Nop that is not it. The combo box is putting it into 2 columns. So something to do with the comma in the fomatted £1,000?
 
What do you have got in the Column Count and Coulumn Widths, properties ??
 
It was the comma that was causing the problem.

Changed the code to:

Code:
Invoice_Amount.RowSourceType = "Value List"
Invoice_Amount.RowSource = Replace(Format(Nz(Cost), "Currency"), ",", vbNullString)
You don't get the comma any more but at least it puts it on the one row or column now.
 

Users who are viewing this thread

Back
Top Bottom