abenitez77
Registered User.
- Local time
- Today, 12:16
- Joined
- Apr 29, 2010
- Messages
- 141
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(DCount("[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"
(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(DCount("[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"
Last edited: