473,325 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

I don't know how Resume Next is configured to work

MLH
Consider the following 3 lines. If there are no records in tblStartUps
and the DMax in line 65 returns Null, a runtime error condition exists
in that Null is not a valid value for LastInRefNum. My question is
Is the Resume Next setting supposed to resume processing at A = 4 or
is it supposed to jump to line #70?
61 On Error Resume Next
65 LastInRefNum = DMax("[InRefNum]", "tblStartUps") : A = 4
70 MyDate = DMin("[VehicleJobTDstamp]", "tblVehicleJobs")
Nov 13 '05 #1
4 1483
On Tue, 11 Oct 2005 13:39:21 -0400, MLH <CR**@NorthState.net> wrote:
Consider the following 3 lines. If there are no records in tblStartUps
and the DMax in line 65 returns Null, a runtime error condition exists
in that Null is not a valid value for LastInRefNum. My question is
Is the Resume Next setting supposed to resume processing at A = 4 or
is it supposed to jump to line #70?
61 On Error Resume Next
65 LastInRefNum = DMax("[InRefNum]", "tblStartUps") : A = 4
70 MyDate = DMin("[VehicleJobTDstamp]", "tblVehicleJobs")

I would assume A=4 but why not try it?
Better still, in this particular case (and most others) program so as to avoid it.

Nov 13 '05 #2
MLH
Oh, I did try it and saw what it does. It just caught me by surprise.
Never having used the approach. I was expecting something
different. Just wanted to make sure I didn't have something
wierd going on.
I would assume A=4 but why not try it?
Better still, in this particular case (and most others) program so as to avoid it.


Nov 13 '05 #3
MLH wrote:
Consider the following 3 lines. If there are no records in tblStartUps
and the DMax in line 65 returns Null, a runtime error condition exists
in that Null is not a valid value for LastInRefNum. My question is
Is the Resume Next setting supposed to resume processing at A = 4 or
is it supposed to jump to line #70?
61 On Error Resume Next
65 LastInRefNum = DMax("[InRefNum]", "tblStartUps") : A = 4
70 MyDate = DMin("[VehicleJobTDstamp]", "tblVehicleJobs")


What the polite one said plus you should try to avoid on error resume
next, consider this code:

if <condition> then
Do this
else
Do that
end if

Now, if <condition> generates a runtime error then "Do this" will be
executed regardless, you may not want that to happen.
Nov 13 '05 #4
MLH
Oh my god! You're right. I never thought of that.
I've got some more thinking to do. Preciate the
comments Trev.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Now, if <condition> generates a runtime error then "Do this" will be
executed regardless, you may not want that to happen.


Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jitu>> | last post by:
Hi All, I've a query on On Error Resume Next. I've explained what I understand for each case, I'm not sure that this is true. Case: 1] Used in Function/Sub: will resume to the next statement...
1
by: Gary D. Rezek | last post by:
Hi All, I've got a set of asp pages used to register students into the ResNet database. Testing things out under different browser security settings I ran into a problem. The following buttons.......
2
by: Bobby Howell | last post by:
Hi. I have the following which I use either on my server using cscript (.vbs file) or identical code in my ASP pages. The problem is when running in ASP I recieve the following error:...
4
by: Paul T. RONG | last post by:
Dear All, I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end,...
5
by: itsupport1 | last post by:
Hi, I am importing some records from one table to another table, and due to Constraints in the destination table, it Throws an Exception and Skip the Whole Rest of records. So I did implement...
4
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...
13
by: rdemyan via AccessMonster.com | last post by:
My front-end code manually links to the backend file. I was wondering what stops Access from linking to the system tables in the backend file. Is it just by virtue that they are hidden? This...
21
by: jehugaleahsa | last post by:
Hello: I had an hour-long discussion with my boss today. Last night, right before I dozed off, I realized some of his code resulted in duplicate processing. I tried to explain it to him and he...
11
by: fniles | last post by:
In VB 6 I can do the following: Sub MySub on error goto Err1 : --all my codes are here : --say this is where the error occurs : --this is where resume next will bring me after Err1 exit sub...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.