Marcus,
Yes, could be a reference problem.
Use of CurrentDb statement implies that it needs DAO so
check references under Tools in the vba editor window. You
need to have a reference to DAO 3.6 and it is worded thus:
Microsoft DAO 3.6 Object Library
If that doesn't fix it then repost with more detail (e.g.
error messages and codes) and I'll try to reproduce the prob
on my machine.
Good luck
Nick Coe (UK)
www.alphacos.co.uk
"marcus." <(E-Mail Removed)> wrote in
message
news:3CC7E395-E10A-4BEE-A7EE-(E-Mail Removed)...
> I'm trying to run Allen Brownes Error Handling Script as @
:
> http://members.iinet.net.au/~allenbrowne/ser-23a.html
>
> I get a hick-up @: "Set rst =
CurrentDb.OpenRecordset("tLogError")"
>
> I have used the vba exactly as on his web site... a
summary is below... Am I meant to turn on a reference or
something? Or any ideas why this isn't working?
>
> Thanks,
> Marcus
>
> Dim rst As Recordset ' The tLogError table
> Set rst = CurrentDb.OpenRecordset("tLogError")
> With rst
> .AddNew
> ![ErrNumber] = lngErrNumber
> ![ErrDescription] = Left(strErrDescription,
255)
> ![ErrDate] = Now()
> ![CallingProc] = strCallingProc
> ![UserName] = CurrentUser()
> ![ShowUser] = vShowUser
> If Not IsMissing(vParameters) Then
> ![Parameters] = Left(vParameters, 255)
> End If
> .Update
> End With
> rst.Close
>