<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2726.2500" name=GENERATOR></HEAD>
<BODY bgColor=#eaeaea><FONT face=Arial size=2>Dear Kostas Konstantinidis:
</FONT>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT size=2></FONT><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>You havent declared your "db" and "rs" variables. Under
"Dim strMsg as String", put </FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Dim db as DAO.Database</FONT></DIV>
<DIV><FONT face=Arial>Dim rs as DAO.Recordset</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial size=2>======== At 2003-06-25, 10:59:00 you
wrote: ========</FONT></DIV>
<DIV><FONT size=2><BR><FONT face=Arial>
<TABLE width="100%">
<TBODY>
<TR>
<TD width="100%">
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<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></FONT></BLOCKQUOTE></TD></TR></TBODY></TABLE></FONT></FONT><FONT
face=Arial size=2>= = = = = = = = = = = = = = = = = = = = = =</FONT></DIV>
<DIV><FONT face=ËÎÌå size=2>
<DIV><FONT face=Arial>Best regards. </FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV>
<DIV><FONT face=ËÎÌå>
<DIV><FONT face=Arial size=2>Joshua
B <BR><A
href="mailto:lists@jbsolutions.com.au">lists@jbsolutions.com.au</A> </FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="http://www.jbsolutions.com.au">www.jbsolutions.com.au</A>
</FONT></DIV>
<DIV><FONT face=ËÎÌå><FONT size=2><FONT
face=Arial>2003-06-25</FONT>
</FONT></FONT></FONT></FONT></DIV></DIV></DIV></DIV></BODY></HTML>