unbound textbox on a form using Dsum for contol source getting #Error message
Posted on 2007-07-31
I have a unbound txtbox "txtonnetworktotal" that has the control source set to =DSum(("[voice_euro]"+"[sms_euro]"+"[gprs_euro]"),"qrygphursumonnetwork"). The SQL for the query is as follows:
SELECT qrygphursubform.company, Sum(qrygphursubform.voice_euro) AS voice_euro, Sum(qrygphursubform.sms_euro) AS sms_euro, Sum(qrygphursubform.gprs_euro) AS gprs_euro, Sum(qrygphursubform.total_euro) AS total_euro
WHERE (((qrygphursubform.newrecord)="Yes") AND ((qrygphursubform.imsi)=[Forms]![frmgphur]![imsi]))
GROUP BY qrygphursubform.company
HAVING (((qrygphursubform.company)="OM" Or (qrygphursubform.company)="BS" Or (qrygphursubform.company)="D2" Or (qrygphursubform.company)="F2" Or (qrygphursubform.company)="VF" Or (qrygphursubform.company)="LT"));
When I bring up the form all the data on the form and subforms are correct. And when I run the query seperatly and type in the imsi field the query works fine. However in the unbound text box on the form I am getting #Error. What is going on with this?