Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-27-2018, 06:38 AM   #16
jeran042
Newly Registered User
 
Join Date: Jun 2017
Posts: 78
Thanks: 20
Thanked 1 Time in 1 Post
jeran042 is on a distinguished road
Re: Loop through Reports, Output as PDF

It isn't, its holding the "TempVars!COST_CENTER" (800)

And while its outputting, it is giving the name of a third cost_center. The Department name (my only guess as to why I would see this name) is the second department on the list

I only think its that is because in some other loops I use something like "rs.MoveFirst"

jeran042 is offline   Reply With Quote
Old 04-27-2018, 09:03 AM   #17
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,761
Thanks: 10
Thanked 1,285 Times in 1,224 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
Quote:
Originally Posted by jeran042 View Post
It isn't, its holding the "TempVars!COST_CENTER" (800)
You are claiming that the assignment to a TempVar is failing in VBA. This is a significant claim, and one that I don't know how to replicate here. Can you please post a database that demonstrates this problem, because I have never seen anything like this happen before. Probably there is something else going on, but from your description I can't guess what it would be.
hth
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
Old 04-27-2018, 09:19 AM   #18
jeran042
Newly Registered User
 
Join Date: Jun 2017
Posts: 78
Thanks: 20
Thanked 1 Time in 1 Post
jeran042 is on a distinguished road
Re: Loop through Reports, Output as PDF

Markk,

I'm not sure how I would post this DB without an enormous amount of sanitation.

I'm almost sure that something else (more than likely my own error) is going on, and I suppose my next move is to find out what that is before I ask you to put forth any more effort.

As it stands now, you have gotten me very close, I need to uncover what the disconnect is between the desired output and what I am actually getting,

Let me see what I can do,

Very much appreciated,

jeran042 is offline   Reply With Quote
Old 05-01-2018, 09:54 AM   #19
jeran042
Newly Registered User
 
Join Date: Jun 2017
Posts: 78
Thanks: 20
Thanked 1 Time in 1 Post
jeran042 is on a distinguished road
Re: Loop through Reports, Output as PDF

Quote:
Originally Posted by MarkK View Post
You are claiming that the assignment to a TempVar is failing in VBA. This is a significant claim, and one that I don't know how to replicate here. Can you please post a database that demonstrates this problem, because I have never seen anything like this happen before. Probably there is something else going on, but from your description I can't guess what it would be.
hth
Mark
Markk,

I believe I know why I am not achieving the desired output. All of the formulas in the report all reference an unbound textbox called "txtCost_Center"

Example:
Code:
=Round(Nz(DSum("[DEBIT]","qryLedger_Detail","[COST_CENTER]=txtCOST_CENTER" & " And [CATEGORY]='TEMPORARY PERSONNEL'"),"$0"))-Round(Nz(DSum("[CREDIT]","qryLedger_Detail","[COST_CENTER]=txtCOST_CENTER" & " And [CATEGORY]='TEMPORARY PERSONNEL'"),"$0"))
So, that being said, is there a way to populate this textbox with the value of the TempVars?



EDIT:
I was able to pass the TempVars to the form by simply putting "=[TempVars]![COST_CENTER]" in the textbox "txtCost_Center"

Thank you for your help!!

Last edited by jeran042; 05-01-2018 at 11:19 AM.
jeran042 is offline   Reply With Quote
Old 05-01-2018, 01:24 PM   #20
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,761
Thanks: 10
Thanked 1,285 Times in 1,224 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
Re: Loop through Reports, Output as PDF

Nice job! Good luck with the rest of the project.

__________________
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

Tags
outputto pdf , vba

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate Reports as an output ramez75 Reports 18 02-02-2016 04:37 AM
Loop through query results to output emails knarlyd@hotmail.com Modules & VBA 4 02-02-2015 01:24 PM
Output Reports Rich1968 Macros 1 07-01-2011 05:34 AM
Loop not giving expected output branston Modules & VBA 3 08-27-2009 06:20 AM
VBA Loop One Report - output and save many pdf's wstandis Modules & VBA 17 05-29-2009 07:07 AM




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


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

Sponsored Links

How to advertise

Media Kit


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