?
Solved

Need to make Process Loop to Check for True False Proceed on True

Posted on 2007-10-16
5
Medium Priority
?
187 Views
Last Modified: 2010-04-30
I'm loading information into ADODB.Recordset from Excel Spreadsheet for Order Entry need to know how to proceed with developing process loop to check for Boolean Value to proceed to next record.

If rst.RecordCount > 0 Then
    For I = 1 To rst.RecordCount

        Do While frm.booProcess = False

        Loop
        rst.MoveNext
    Next I
End If
0
Comment
Question by:deltadoc
  • 3
5 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 1000 total points
ID: 20086038
If rst.RecordCount > 0 Then
    For I = 1 To rst.RecordCount

        if (frm.booProcess = true) then exit for

        rst.MoveNext
    Next I
End If
0
 

Author Comment

by:deltadoc
ID: 20086066
I need it to Iterate to the next record when the boolean value = true
0
 
LVL 4

Assisted Solution

by:gabbadar
gabbadar earned 1000 total points
ID: 20086146
If rst.RecordCount > 0 Then
    For I = 1 To rst.RecordCount

        if (frm.booProcess = true) then rst.MoveNext

    Next I
End If

There ya go. The problem I see is you're checking a boolean value outside of the record set you're working with. This is probably going to create a condition where you either process all the records in the set, or you only process the first one lots of times.

My best guess as to what you want is to always process all the records in this set, in which case you'll unconditionally want to movenext despite this boolean value. Can you clarify what it is you're trying to do?
0
 

Author Comment

by:deltadoc
ID: 20086170
I'm taking the information from the Excel spreadsheet and loading it into an access 2007 form for entry into SQL dbase I need the process handle to allow for the information to be formatted and verified before input into dbase please let me know if you need more clarification
0
 

Author Comment

by:deltadoc
ID: 20086456
I have figured another method to do what I want it to do thanks for the help
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question