DCount Function - #Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field in datasheet which calculates the number of rows

=DCount("[sid]","ENROL","[cid] = Forms![fsubClassList]![cid]")
This works in subform but when I insert the subform into main form it
generate #Error

Could anyone help me sovle this problem?

Thanks in advance :)
 
sgyan1 said:
I have a field in datasheet which calculates the number of rows

=DCount("[sid]","ENROL","[cid] = Forms![fsubClassList]![cid]")
This works in subform but when I insert the subform into main form it
generate #Error


If the cid text box is in a subform, then you need to change
the reference to this kind of thing:

=DCount("sid","ENROL","cid = Forms![main form
name].fsubClassList.Form!cid")
 
Back
Top