BlakeMcKenna
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_SelectionChan geCommitte d(sender As Object, e As EventArgs) Handles cmbTApprover.SelectionChan geCommitte d
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_SelectionCh angeCommit ted() - " & ex.Message & ",E"
End Try
ProcessMessages(Me, sbr, strErr)
End Sub
I'm using the SelectionChangeCommitted()
Private Sub cmbTApprover_SelectionChan
Try
strErr = ""
If cmbTApprover.Text.Length > 0 Then
ptLoc = cmbTApprover.PointToScreen
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_SelectionCh
End Try
ProcessMessages(Me, sbr, strErr)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad i guide you!!
Yiannis
Yiannis
ASKER
Thanks