R
ragtopcaddy via AccessMonster.com
My code is below.
When the event happens originally, apparently when it gets to the .
RecordSource line, it causes the NotInList event to refire. As I step through
it, it goes from the .RecordSource line back to the Private Sub line. Any
suggestions?
Private Sub cmbTermFinder_NotInList(NewData As String, Response As Integer)
DoCmd.SetWarnings False
dbLocal.Execute "INSERT INTO tblTerminology ( Term ) SELECT """ & NewData &
""" AS Term", dbFailOnError
'Tell Access you've added the value
Response = acDataErrAdded
DoCmd.SetWarnings True
With Me
.RecordSource = .RecordSource
.Requery
End With
With DoCmd
.GoToControl ("txtTERMID")
.FindRecord Me.cmbTermFinder.Column(0), acEntire, , acSearchAll, , acAll,
True
.GoToControl ("txtTerm")
End With
Me.cmbTermFinder = Null
End Sub
When the event happens originally, apparently when it gets to the .
RecordSource line, it causes the NotInList event to refire. As I step through
it, it goes from the .RecordSource line back to the Private Sub line. Any
suggestions?
Private Sub cmbTermFinder_NotInList(NewData As String, Response As Integer)
DoCmd.SetWarnings False
dbLocal.Execute "INSERT INTO tblTerminology ( Term ) SELECT """ & NewData &
""" AS Term", dbFailOnError
'Tell Access you've added the value
Response = acDataErrAdded
DoCmd.SetWarnings True
With Me
.RecordSource = .RecordSource
.Requery
End With
With DoCmd
.GoToControl ("txtTERMID")
.FindRecord Me.cmbTermFinder.Column(0), acEntire, , acSearchAll, , acAll,
True
.GoToControl ("txtTerm")
End With
Me.cmbTermFinder = Null
End Sub