Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

SelectionChangeCommitted() Event not working?

I have several ComboBox controls on my a Form. Each of these are within a separate panel control (5 panels, 1 combobox per panel).

I'm using the SelectionChangeCommitted() Event for each of these comboboxes. My problem is that when I select a value, it executes the event but the value is nothing. I then select the same value again and then it has a value and it executes the way it is suppose to. Why is it taking 2 times to get a value? Here is just one of the Event Procedures below. I just use one because the rest are just like it...with the exception of the field name.

        Private Sub cmbTApprover_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cmbTApprover.SelectionChangeCommitted
        Try
                strErr = ""

                If cmbTApprover.Text.Length > 0 Then
                    ptLoc = cmbTApprover.PointToScreen(New Point(0, 0))
                    ptLoc.Y += cmbTApprover.Height + 5

                    gstrApprover = cmbTApprover.Text

                    If GetApproverPassword() Then
                        btnUpdate.Enabled = True
                    End If
                End If

        Catch ex As Exception
            strErr = gfrmID & "/cmbTApprover_SelectionChangeCommitted() - " & ex.Message & ",E"
        End Try

        ProcessMessages(Me, sbr, strErr)
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BlakeMcKenna

ASKER

jtoutou...you were right...it was a logic issue!

Thanks
Glad i guide you!!

Yiannis