M
muneca
I have a DSum in a text box's Control Source:
=DSum("[Quantity]*[UnitPrice]","tblInvoice","BillDate=#" &
DateAdd("m",-1,me!cboSelectDate) & "#")
I continue to get the #Name? error in the text box when I open the form.
The field names are correct, as is the table name and cboSelectDate has a
date when the form is loaded. Just to see what would happen I also wrote an
identical function passing the value in cboSelectDate to it and using the
result of the function as the caption for a label on the form and it works
just fine.
It just bothers me that I can't get DSum to work in the text box as it should.
=DSum("[Quantity]*[UnitPrice]","tblInvoice","BillDate=#" &
DateAdd("m",-1,me!cboSelectDate) & "#")
I continue to get the #Name? error in the text box when I open the form.
The field names are correct, as is the table name and cboSelectDate has a
date when the form is loaded. Just to see what would happen I also wrote an
identical function passing the value in cboSelectDate to it and using the
result of the function as the caption for a label on the form and it works
just fine.
It just bothers me that I can't get DSum to work in the text box as it should.