I didn't know that about DCount()
I'm assuming you have spelled your form and controls correctly.
That having been said, why not put a bang (!) in front to the text
box instead of a dot (.) ?
Forms!frmOrder!txtDCountofqryOrders.ControlSource
It shouldn't make a difference, but sometimes I've seen code get
a little finicky about such trivial things.
Otherwise, it seems to evaluate correctly in the Debug window.
Running this ...
?"=DCount(""*"",""fldCustomerName"", ""qryOrderbyCustomer"")"
Evaluates and returns this ...
=DCount("*","fldCustomerName", "qryOrderbyCustomer")
I don't see anything wrong here.
--
Danny J. Lesandrini
(e-mail address removed)
www.amazecreations.com
NNlogistics said:
Danny thanks for the response. I still get the error. The dcount stament I
am using works in other places. "=DCount (""fldCustomerName"",
""qryOrderbyCustomer"")" is actually the 1st(Field to count) and 2nd(qry or
table). I left out the 3rd which is "where" because I have no conditions.
I think the problem is with the left side of = , I am getting #ERROR.
Wouldn't I get #NAME if it were the right side? Not sure about that but I
think the Dsum part is ok