<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=984430708-25062003><FONT face=Arial color=#0000ff size=2>you
need to "Dim db as Database" somewhere...</FONT></SPAN></DIV>
<DIV><SPAN class=984430708-25062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=984430708-25062003><FONT face=Arial color=#0000ff
size=2>mark</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Kostas
Konstantinidis<BR><B>Sent:</B> 25 June 2003 08:59<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD] Compile
error<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2>I need some help please with an error
message</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>when I try to enter a new record into... I get
the follown error</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><STRONG>Compile
error</STRONG></FONT></DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><STRONG>variable not
defined</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the code:</FONT></DIV>
<DIV><FONT face=Arial size=2>Private Sub idpoli_NotInList(NewData As String,
Response As Integer)<BR> Dim strMsg As
String<BR> strMsg = "'" & NewData & "' bla
bla"<BR> strMsg = strMsg & "@bla
bla;"<BR> strMsg = strMsg & "@bla
bla."<BR> If MsgBox(strMsg, vbQuestion + vbYesNo, "new
data") = vbNo Then<BR> Response =
acDataErrContinue<BR> Else<BR><FONT
color=#ff0000><STRONG> Set db =
CurrentDb<BR></STRONG></FONT> Set rs
= db.OpenRecordset("T_poli",
dbOpenDynaset)<BR> On Error Resume
Next<BR>
rs.AddNew<BR>
rs!poli = NewData<BR>
rs.Update<BR>
<BR> If Err
Then<BR>
MsgBox "bla
bla."<BR>
Response = acDataErrContinue<BR>
Else<BR>
Response = acDataErrAdded<BR> End
If<BR> End If</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>End Sub<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank's a lot</FONT></DIV>
<DIV><FONT face=Arial size=2>Kostas
Konstantinidis</DIV></BLOCKQUOTE></FONT></BODY></HTML>