Originally Posted by MarkK
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.
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"
=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?
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!!