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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top