473,386 Members | 1,715 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,386 software developers and data experts.

access 97: do without loop error and nesting problems

help! i'm caught in the endless of "compile error message: do without
loop." i thought that i closed all of my statments but it appears
not. does anyone know why my structure is incorrect?

what i'm trying to do is to find "series key" and if so, then parse
the appropriate data. then if it finds "issuer" it needs to exit.

thanks in advance!!!
jung.
Set rst = dbs.OpenRecordset("Test", dbOpenDynaset)
Set rstclean = dbs.OpenRecordset("CDtest", dbOpenDynaset)
rst.MoveFirst
Do Until rst.EOF
'Open Current Record for editing
If x = InStr(rst![Field1].Value, "SERIES KEY") Then
Do While InStr(rst![Field1].Value, "SERIES KEY") <> 0
rst.MoveNext
rst.MoveNext
rst.MoveNext
Do Until IsNumeric(x) = False
rstclean.AddNew
key = rst![Field1].Value & " "
'etoile = rst![Field2].Value & " "
Pay = rst![Field2].Value & " "
Coll = rst![Field3].Value & " "
cashbalance = rst![Field4].Value & " "
rstclean![series].Value = key
'rstclean![Star].Value = etoile
rstclean![Payments].Value = Pay
rstclean![Collections].Value = Coll
rstclean![CashBal].Value = cashbalance

rstclean.Update
rst.MoveNext
x = Len(rst![Field1].Value)
Loop
rst.MoveNext
Loop
rst.MoveNext

ElseIf InStr(rst![Field2].Value, " ISSUER") <> 0 Then
Loop
Nov 12 '05 #1
2 4249
"ElseIf InStr(rst![Field2].Value, " ISSUER") <> 0 Then" needs a body
and an "End If" before the "Loop" statement.

On 3 Mar 2004 16:15:51 -0800, pi******@yahoo.fr (JMCN) wrote:
help! i'm caught in the endless of "compile error message: do without
loop." i thought that i closed all of my statments but it appears
not. does anyone know why my structure is incorrect?

what i'm trying to do is to find "series key" and if so, then parse
the appropriate data. then if it finds "issuer" it needs to exit.

thanks in advance!!!
jung.
Set rst = dbs.OpenRecordset("Test", dbOpenDynaset)
Set rstclean = dbs.OpenRecordset("CDtest", dbOpenDynaset)
rst.MoveFirst
Do Until rst.EOF
'Open Current Record for editing
If x = InStr(rst![Field1].Value, "SERIES KEY") Then
Do While InStr(rst![Field1].Value, "SERIES KEY") <> 0
rst.MoveNext
rst.MoveNext
rst.MoveNext
Do Until IsNumeric(x) = False
rstclean.AddNew
key = rst![Field1].Value & " "
'etoile = rst![Field2].Value & " "
Pay = rst![Field2].Value & " "
Coll = rst![Field3].Value & " "
cashbalance = rst![Field4].Value & " "
rstclean![series].Value = key
'rstclean![Star].Value = etoile
rstclean![Payments].Value = Pay
rstclean![Collections].Value = Coll
rstclean![CashBal].Value = cashbalance

rstclean.Update
rst.MoveNext
x = Len(rst![Field1].Value)
Loop
rst.MoveNext
Loop
rst.MoveNext

ElseIf InStr(rst![Field2].Value, " ISSUER") <> 0 Then
Loop


Nov 12 '05 #2
You did not close your IF statement. It requires an End If. Sometimes
compile errors having to do with any type of loop can be deceiving. Almost
as if the compiler just picks the first block when any End statement is
missing. Also, I'm not sure what you are trying to do with the last two
lines, so they may or may not cause a problem. If not an error, then likely
a logical one.

Mike Storr
www.veraccess.com
"JMCN" <pi******@yahoo.fr> wrote in message
news:27*************************@posting.google.co m...
help! i'm caught in the endless of "compile error message: do without
loop." i thought that i closed all of my statments but it appears
not. does anyone know why my structure is incorrect?

what i'm trying to do is to find "series key" and if so, then parse
the appropriate data. then if it finds "issuer" it needs to exit.

thanks in advance!!!
jung.
Set rst = dbs.OpenRecordset("Test", dbOpenDynaset)
Set rstclean = dbs.OpenRecordset("CDtest", dbOpenDynaset)
rst.MoveFirst
Do Until rst.EOF
'Open Current Record for editing
If x = InStr(rst![Field1].Value, "SERIES KEY") Then
Do While InStr(rst![Field1].Value, "SERIES KEY") <> 0
rst.MoveNext
rst.MoveNext
rst.MoveNext
Do Until IsNumeric(x) = False
rstclean.AddNew
key = rst![Field1].Value & " "
'etoile = rst![Field2].Value & " "
Pay = rst![Field2].Value & " "
Coll = rst![Field3].Value & " "
cashbalance = rst![Field4].Value & " "
rstclean![series].Value = key
'rstclean![Star].Value = etoile
rstclean![Payments].Value = Pay
rstclean![Collections].Value = Coll
rstclean![CashBal].Value = cashbalance

rstclean.Update
rst.MoveNext
x = Len(rst![Field1].Value)
Loop
rst.MoveNext
Loop
rst.MoveNext

ElseIf InStr(rst![Field2].Value, " ISSUER") <> 0 Then
Loop

Nov 12 '05 #3

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

Similar topics

6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
32
by: Toby Newman | last post by:
At the page: http://www.strath.ac.uk/IT/Docs/Ccourse/subsection3_8_3.html#SECTION0008300000000000000 or http://tinyurl.com/4ptzs the author warns: "The for loop is frequently used, usually...
8
by: Hardrock | last post by:
I encountered some difficulty in implementing dynamic loop nesting. I.e. the number of nesting in a for(...) loop is determined at run time. For example void f(int n) { For(i=0; i<=K; i++)...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
4
by: The Facilitator | last post by:
Well, Outlook seems to be making my life more and more challenging. Categories are added in one field and are delimmited via comma. Have three questions on this one... The first is right now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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 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.