G
George Akers
I have a ComboBox with LimitToList set to Yes. When the user enters a
new value(not in list) I call a routine to add that value to the list.
Prior to that I put up a MsgBox asking the user if that is what they
want to do. If they select no I return to the ComboBox and perform an
Undo. The problem is that the list is always dropped down when control
returns to the user. Does anyone know how to avoid this? Here is the
NotInList Event:
Private Sub cboContact_NotInList(NewData As String, Response As Integer)
On Error GoTo cboContact_NotInListErr
Dim intAddRow As Integer
AddNewRows "tblContacts", intAddRow
If intAddRow = vbNo Then
Me.cboContact.Undo
End If
Response = 0
cboContact_NotInListExit:
Exit Sub
cboContact_NotInListErr:
MsgBox Err.Description, , "Runtime Error # " & Err.Number & " in "
& Err.Source
Resume cboContact_NotInListExit
End Sub
TIA, George
new value(not in list) I call a routine to add that value to the list.
Prior to that I put up a MsgBox asking the user if that is what they
want to do. If they select no I return to the ComboBox and perform an
Undo. The problem is that the list is always dropped down when control
returns to the user. Does anyone know how to avoid this? Here is the
NotInList Event:
Private Sub cboContact_NotInList(NewData As String, Response As Integer)
On Error GoTo cboContact_NotInListErr
Dim intAddRow As Integer
AddNewRows "tblContacts", intAddRow
If intAddRow = vbNo Then
Me.cboContact.Undo
End If
Response = 0
cboContact_NotInListExit:
Exit Sub
cboContact_NotInListErr:
MsgBox Err.Description, , "Runtime Error # " & Err.Number & " in "
& Err.Source
Resume cboContact_NotInListExit
End Sub
TIA, George