Hi,
I have mainform called F_Project with subform F_ProjAssigneeDetails - one-to-many relation
The key field in main form is ProjNum which is relevant with subform as well. When we enter new project in main form, we adds number employee to that particular projects.
I just want to count number of staff assigned on a particular projects. I tried it with Dcount but the X is producing 0 only where as there are 3 active employees assigned on that project. my AssigneeActive is check mark field on subform.
Following code is triggering thru a combo placed on main form.
No error but not counting numbers.
Any help shall be appreciated..
I have mainform called F_Project with subform F_ProjAssigneeDetails - one-to-many relation
The key field in main form is ProjNum which is relevant with subform as well. When we enter new project in main form, we adds number employee to that particular projects.
I just want to count number of staff assigned on a particular projects. I tried it with Dcount but the X is producing 0 only where as there are 3 active employees assigned on that project. my AssigneeActive is check mark field on subform.
Following code is triggering thru a combo placed on main form.
Code:
Dim X As Integer
X = DCount("*", "T_ProjAssigneeDetails", "ProjNum = 'ProjNum' and 'Me!F_ProjAssigneeDetails!AssigneeActive.value= true'")
Me!F_ProjAssigneeDetails!TotAssignedStaff = " " & X
No error but not counting numbers.
Any help shall be appreciated..
Last edited: