i use this as expression in a continues form and it returns a number of times an event apperas and it works ok, gives me the right value for each entry
counts the number of times a person that's displayed in txtOper box is in ooper field of the table, different number for each person
now if i use it as vba, like this
it always uses the first person and the result is the same for each entry in a continues form (or if i do it in single form format, it doesn't get recalculated)
I'd like to do it through vba, cause it allows me for users to build their own queries adding different parameters.
Any ideas
Code:
DCount("*";"Oper";"[oOper] = '" & [txtOper] & "' and [ostatus]='done'")
counts the number of times a person that's displayed in txtOper box is in ooper field of the table, different number for each person
now if i use it as vba, like this
Code:
Me.tTest = DCount("*", "Oper", "[oOper] = '" & [txtOper] & "' and [ostatus]='done'")
it always uses the first person and the result is the same for each entry in a continues form (or if i do it in single form format, it doesn't get recalculated)
I'd like to do it through vba, cause it allows me for users to build their own queries adding different parameters.
Any ideas