Kostas Konstantinidis
kost36 at otenet.gr
Wed Jun 25 02:59:24 CDT 2003
Hi all, I need some help please with an error message when I try to enter a new record into... I get the follown error Compile error variable not defined the code: Private Sub idpoli_NotInList(NewData As String, Response As Integer) Dim strMsg As String strMsg = "'" & NewData & "' bla bla" strMsg = strMsg & "@bla bla;" strMsg = strMsg & "@bla bla." If MsgBox(strMsg, vbQuestion + vbYesNo, "new data") = vbNo Then Response = acDataErrContinue Else Set db = CurrentDb Set rs = db.OpenRecordset("T_poli", dbOpenDynaset) On Error Resume Next rs.AddNew rs!poli = NewData rs.Update If Err Then MsgBox "bla bla." Response = acDataErrContinue Else Response = acDataErrAdded End If End If End Sub Thank's a lot Kostas Konstantinidis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030625/75e171ca/attachment.html>