Go Back   Access World Forums > Apps and Windows > Visual Basic

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-01-2018, 08:18 PM   #61
BigHappyDaddy
Coding Monkey Wanna-Be
 
BigHappyDaddy's Avatar
 
Join Date: Aug 2012
Location: Puyallup, WA
Posts: 203
Thanks: 6
Thanked 38 Times in 37 Posts
BigHappyDaddy is on a distinguished road
Re: Coding Help please

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!

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BigHappyDaddy is offline   Reply With Quote
Old 03-01-2018, 10:49 PM   #62
MITSupport
Newly Registered User
 
Join Date: Aug 2016
Posts: 46
Thanks: 2
Thanked 0 Times in 0 Posts
MITSupport is on a distinguished road
Re: Coding Help please

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 is offline   Reply With Quote
Old 03-02-2018, 01:58 AM   #63
MITSupport
Newly Registered User
 
Join Date: Aug 2016
Posts: 46
Thanks: 2
Thanked 0 Times in 0 Posts
MITSupport is on a distinguished road
Re: Coding Help please

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

MITSupport is offline   Reply With Quote
Old 03-02-2018, 08:47 AM   #64
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,761
Thanks: 10
Thanked 1,287 Times in 1,225 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
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

__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Coding Prayder Modules & VBA 4 03-28-2014 03:23 PM
Need some help with coding Marinus Forms 10 03-22-2011 04:47 AM
Coding help please... WSC Modules & VBA 2 11-20-2006 10:53 AM
Which is a better way of coding? yhgtbfk General 6 10-18-2004 05:21 AM
VBA Coding StefanSch Forms 7 04-14-2003 08:52 AM




All times are GMT -8. The time now is 04:24 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World