PDA

View Full Version : Solved: Changing Rowsource After update on another field



A9992736
12-26-2012, 06:27 PM
Hi guys, I would appreciate any assistance to my problems with VBA programming.

First of all, I have a combo box (cmb_Fac_Curr) which shows three types of currencies which are "GBP", "SGD" and "JPY".

I want the row source of cmb_Fac_Curr to change to only "GBP" and "SGD" available if the user chooses the product type "UL" from the combo box cmb_Product_Type.

Currently I've written it like this:

Private Sub cmb_Product_Type_AfterUpdate()


If cmb_Product_Type = "UL" Then
Me!cmb_Fac_Curr.RowSource = "GBP"
End If

How do I make it show "SGD" too?

A9992736
12-26-2012, 06:41 PM
Solved:

Me!cmb_Fac_Curr.RowSourceType = "Value List"
Me!cmb_Fac_Curr.RowSource = "GBP;SGD"