Private Sub cboZip_NotInList(NewData As String, Response As Integer)
on error resume next
if me.txtCity="" or me.txtState="" then exit sub
dim strSQL as string
strSQL = "INSERT INTO MyTable ([City], [State], [Zip]) VALUES ('" & me.txtCity & "', '" & me.txtState & "', '" & NewData & "')"
CurrentDB.Execute strsql
if err.number =0 then
msgbox "Record Inserted"
else
msgbox "There was a error inserting the record" & vbcr & vbcr & "Error: " & err.number & vbcr & "Desc: " & err.description
end if
End Sub