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 3 5431
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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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
|
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: 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...
|
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:...
|
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...
|
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...
|
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,
|
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....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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,...
| |