By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

On Error Resume Next - not working

P: n/a
Access 2k (10.6501.6714) SP3

For YEARS the code line "On Error Resume Next" has worked without any
problems. It is an essential tool. A couple of days ago, I put in
another hard drive, mentioned because the problems have arisen since
then, and transferred a lot of files, mainly MDB files, to the new
drive. This line of code now fails to work in all the databases I have
tried. I get error messages where none appeared before. I tried to
following code as a test.

Dim test As String
On Error Resume Next
test = DLookup("AppNameDac", "tblFirm")

The lookup field is a null. Without the offending line I get an error
and exactly the same result when the line is inserted. I have
decompiled. I have put the mdb file back where it was originally.

Has anyone any idea why this should suddenly plague me? What have I
done?

Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 12 Dec 2004 07:57:08 -0800, to*******@tiscali.co.uk (tom blower)
wrote:
Access 2k (10.6501.6714) SP3

For YEARS the code line "On Error Resume Next" has worked without any
problems. It is an essential tool. A couple of days ago, I put in
another hard drive, mentioned because the problems have arisen since
then, and transferred a lot of files, mainly MDB files, to the new
drive. This line of code now fails to work in all the databases I have
tried. I get error messages where none appeared before. I tried to
following code as a test.

Dim test As String
On Error Resume Next
test = DLookup("AppNameDac", "tblFirm")

The lookup field is a null. Without the offending line I get an error
and exactly the same result when the line is inserted. I have
decompiled. I have put the mdb file back where it was originally.

Has anyone any idea why this should suddenly plague me? What have I
done?

Thanks


What error message do you get?
Did you compile the mdb?
Did you check the references?

HTH
Matthias Kläy
--
www.kcc.ch
Nov 13 '05 #2

P: n/a
Check in VBE (Tools | Options | General tab) that your db file is not set
to break on all errors. Should be set to break on unhandled errors.

--

Ken Snell
<MS ACCESS MVP>

"tom blower" <to*******@tiscali.co.uk> wrote in message
news:91**************************@posting.google.c om...
Access 2k (10.6501.6714) SP3

For YEARS the code line "On Error Resume Next" has worked without any
problems. It is an essential tool. A couple of days ago, I put in
another hard drive, mentioned because the problems have arisen since
then, and transferred a lot of files, mainly MDB files, to the new
drive. This line of code now fails to work in all the databases I have
tried. I get error messages where none appeared before. I tried to
following code as a test.

Dim test As String
On Error Resume Next
test = DLookup("AppNameDac", "tblFirm")

The lookup field is a null. Without the offending line I get an error
and exactly the same result when the line is inserted. I have
decompiled. I have put the mdb file back where it was originally.

Has anyone any idea why this should suddenly plague me? What have I
done?

Thanks

Nov 13 '05 #3

P: n/a
Thanks for the replies, which have helped to concentrate the mind!

The Options are set OK, but there is always the possibility that
someone might change them manually.

What was wrong was that I had inadvertently set Error Trapping to 0. I
had been playing with this the other day.

Application.SetOption "Error Trapping", 2
on loading the startup form solves the issue. This should be a
standard line of code in all applications so that the issue is
controlled once the application is "out there".

Thanks
Reply
Details: Show quoted text | View source | Unwrap Lines | Forward

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.