473,960 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

On Error Resume Next - not working

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("AppNam eDac", "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
3 5476
On 12 Dec 2004 07:57:08 -0800, to*******@tisca li.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("AppNam eDac", "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
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*******@tisc ali.co.uk> wrote in message
news:91******** *************** ***@posting.goo gle.com...
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("AppNam eDac", "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
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.Set Option "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
6516
by: aaron | last post by:
On Winxp Pro I try to trap an error: On error resume next If (Err.Number <> 0) Then End sub End If but no matter what the case Err.Number = 0. When I was using visual basic 6.0 on a win2k pro computer, errors were returned with values other than 0.
3
3291
by: Michael | last post by:
Hello again everyone, Hope you can help. I have a form with a lot of code going on in the background but I can't find the route cause of the following error message. Update or Cancel Update Without Add New or Edit. I understand that when trying to update records you have to work
13
6642
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
8498
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order by VisitDt" I'm getting this error message: Errno is 2465. Err.description is "Can't find field '|' referred to in your expression"
10
2320
by: Anthony England | last post by:
(sorry for the likely repost, but it is still not showing on my news server and after that much typing, I don't want to lose it) I am considering general error handling routines and have written a sample function to look up an ID in a table. The function returns True if it can find the ID and create a recordset based on that ID, otherwise it returns false. **I am not looking for comments on the usefulness of this function - it is
0
7733
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get: "-2147467259 The database has been place in a state by user 'Admin' on machine ..... that prevents it from being opened or locked."
3
27470
by: bob.needler | last post by:
I know On Error Resume Next is generally considered lazy. But can someone tell me why the resume next in Exit_Handler does not seem to work? It generates the typical unhandled runtime error message from Access. If I comment out the 1st On Error Resume Next and the x = 1 / 0 on the next line there is no difference, i.e. ther same unhandled error on the same line. I included these 2 lines of code to demonstrate that On Error Resume Next...
4
3800
by: Neo | last post by:
I found on error resume next doesn't work in for each... e.g. on error resume next for each x in y 'do stuff next if you have an error in for each loop, it falls in infinite loop... it doesn't move to next element... this sad thing but, it's indication that we must move to try catch instead of on error.
11
48037
by: Maxwell2006 | last post by:
Hi, I know that this is not a good practice, but I wonder do we have "on error resume next" in C#? Thanks,
4
11348
by: Abdhul Saleem | last post by:
Hi, I am recieving error ActiveX component can't create object in the following line in the asp page. set ExcelApp = CreateObject("Excel.Application") Previously this code was working fine. Thanks in advance.
0
10265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10797
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10004
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8374
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.