Private Sub cboItemName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboItemName.SelectedIndexChanged '-- Look the item price and if found and there is a current price, ask ' the user if he/she wants to overwrite the Item Price. If Me.BizItems_Lookup.Count > 0 Then If Me.BizItems_Lookup.SeekToPrimaryKey(Me.bizSC_AppliancesItems1.FK_Items) Then If Me.bizSC_AppliancesItems1.ItemPrice <= 0 Then Me.bizSC_AppliancesItems1.ItemPrice = Me.BizItems_Lookup.ItemPrice Else If Me.ShowMessageByKey("ApplianceItems_OverwriteItemPrice", Me.bizSC_AppliancesItems1.ItemPrice, Me.BizItems_Lookup.ItemPrice) = MicroFour.StrataFrame.Messaging.MessageFunctionType.Yes Then Me.bizSC_AppliancesItems1.ItemPrice = Me.BizItems_Lookup.ItemPrice End If End If End If Me.bizSC_AppliancesItems1.Refresh("ItemPrice") End IfEnd Sub
The problem is that when the ChildFormDialog is being loaded, the cboItemName_SelectedIndexChanged method is being fired several times, even when the form has not even shown. In VFP I would simply put the code in the combobox.Valid(), how to get the same effect as the VFP combobox.Valid() or what event should be used in the combo in this scenario ?