Formulas in Textbox

jeudi 2 avril 2015

I have made an application into a dynamic application and the form names change. I capture the form names in variables. I want to make my formula below which is in a textbox in my form dynamically.



(In the control source of a textbox)

This works in my old form:

=IIf([Forms]![F_WorkspaceRebates]![FormGroupID]="","0.0",IIf(DCount("[name]","msysobjects","[name]='Tab06'")>0,Nz(DSum("MERCH_COST","Tab06","[Include]<>0"),"0.0"),"0.00"))





I'm trying something like this but does not work:



=IIf(Forms([mainform]).Controls("FormGroupID").Value="","0.0",IIf(DCoun t("[name]","msysobjects","[name]= 'Dyn_' & Project_ID & '_Tab06'")>0,Nz(DSum("MERCH_COST","Dyn_" & Project_ID & "_Tab06","[Include]<>0"),"0.0"),"0.00"))





The above is using the variables below:

mainform = "Dyn_84_workspace"

Project_ID = "84"



The dynamic table name that I am concatenating is : "Dyn_84_Tab06". In my old form it was just "Tab06"

Formulas in Textbox

0 commentaires:

Enregistrer un commentaire

Labels