Coding Help please (1 Viewer)

BigHappyDaddy

Coding Monkey Wanna-Be
Local time
Today, 02:11
Joined
Aug 22, 2012
Messages
205
Well dang!

Well, I am with Mark, you really need to step through using the debugger to determine where your code is going sideways.

If you are able to debug and find out something useful, feel free to post again if you are still unable to solve it on your own.

If anyone else is able to assist, feel free as well!
 

MITSupport

Registered User.
Local time
Today, 19:11
Joined
Aug 8, 2016
Messages
46
Hi Guys

I think i have figured it out.

I can remove the loop easily enough but i need to tell the routine to re query each time.

Please tell me if i am wrong

Allan
 

MITSupport

Registered User.
Local time
Today, 19:11
Joined
Aug 8, 2016
Messages
46
Hi guys i have figured out where the error lies but i dont know how to fix it.

When the first run of PrintRoutine is completed it retains the Original Case. I am trying to figure out how to get the routine to "reset" and on the .MoveNext select a new case as the ReportType field will be different on each instance.

I have stepped through the code and the Loop works fine for the same "ReportType" but it goes off centre when a different ReportType is thrown into the mix.

So in essence the question i am asking is it possible to have the SELECT CASE statement inside of the Loop?

Allan
 

MarkK

bit cruncher
Local time
Today, 02:11
Joined
Mar 17, 2004
Messages
8,178
Here are a few questions.
Why is there a loop? This subroutine is passed one ReportType, and the query that controls the loop, qryReports, doesn't appear to know what that report type is. How does that makes sense? What data is provided by qryReports? What is the subroutine supposed to do?

Mark
 

Users who are viewing this thread

Top Bottom