Kostas Konstantinidis
kost36 at otenet.gr
Wed Jun 25 04:04:38 CDT 2003
Mark and Josua
Thank's a lot
Kostas Konstantinidis
----- Original Message -----
From: Joshua B
To: accessd at databaseadvisors.com
Sent: Wednesday, June 25, 2003 11:12 AM
Subject: Re: [AccessD] Compile error
Dear Kostas Konstantinidis:
You havent declared your "db" and "rs" variables. Under "Dim strMsg as String", put
Dim db as DAO.Database
Dim rs as DAO.Recordset
======== At 2003-06-25, 10:59:00 you wrote: ========
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
= = = = = = = = = = = = = = = = = = = = = =
Best regards.
Joshua B
lists at jbsolutions.com.au
www.jbsolutions.com.au
2003-06-25
------------------------------------------------------------------------------
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030625/4cb98be6/attachment-0001.html>