Thursday, 19 September 2013

Loop only when between 2 numbers

Loop only when between 2 numbers

I have been putting off asking this questions as it seemed like such a
simple problem I could solve but i have be racking my brains and now cant
think.
I need to make my app only run the loops below when between 2 number. For
example:
Do While SOPickRS.RecordCount >=1 and <=4
I have tried loads of different combinations of code but cant seem to find
the correct one.
This is what I currently have that doesnt work because when the
RecordCount is 1 for example they will all run one after the other. I
understand why it is doing this however I cannot find the solution to it:
Do Until SOPickRS.RecordCount = 4
'Do Stuff
Loop
Do Until SOPickRS.RecordCount = 8
'Do Stuff
Loop
Do Until SOPickRS.RecordCount = 12
'Do Stuff
Loop

No comments:

Post a Comment