• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

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

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
deltadoc
Asked:
deltadoc
  • 3
2 Solutions
 
EDDYKTCommented:
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
 
deltadocIT ManagerAuthor Commented:
I need it to Iterate to the next record when the boolean value = true
0
 
gabbadarCommented:
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
 
deltadocIT ManagerAuthor Commented:
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
 
deltadocIT ManagerAuthor Commented:
I have figured another method to do what I want it to do thanks for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now