O
OceanView
Why doesn't this work?
The control txtDaddr is a combobox with a recordset, rsaddress, as
it's source. When I type a new data string and the notinlist event
fires, the addnew works, but I still get a notinlist error, even
though I do a requery and the data WAS added. Why?
Private Sub txtDaddr_NotInList(NewData As String, Response As
Integer)
On Error Resume Next
update_address rsaddress, "address", NewData
txtDaddr.Requery
Response = Access.acDataErrAdded
End Sub
Sub update_address(rs As adodb.Recordset, strFieldName As String,
strData As String)
On Error Resume Next
rs.AddNew strFieldName, strData
rs.Update
End Sub
The control txtDaddr is a combobox with a recordset, rsaddress, as
it's source. When I type a new data string and the notinlist event
fires, the addnew works, but I still get a notinlist error, even
though I do a requery and the data WAS added. Why?
Private Sub txtDaddr_NotInList(NewData As String, Response As
Integer)
On Error Resume Next
update_address rsaddress, "address", NewData
txtDaddr.Requery
Response = Access.acDataErrAdded
End Sub
Sub update_address(rs As adodb.Recordset, strFieldName As String,
strData As String)
On Error Resume Next
rs.AddNew strFieldName, strData
rs.Update
End Sub