title: This expression is typed incorrectly, or it is too complex to be evaluated.
body: <p>This query runs an item ledger. When i try to sum Returns field on access report by using =SUM([Returns]) i.e Return is text box on access report. it shows following error when report is run. 
  **</p>
  
  <blockquote>
    <p>This expression is typed incorrectly, or it is too complex to be
    evaluated. For example, a numeric expression may contain too many
    complicated elements. Try simplifying the expression by assigning
    parts of the expression to variables.</p>
  </blockquote>
  
  <p>**</p>
  
  <pre><code>SELECT ITEM, [Transaction Date], ID, Reciept, Issued, Returns, Remarks, Manual
  FROM 
   (SELECT t.item AS ITEM, irh.reciept_date AS [Transaction Date], ird.inv_id AS ID, ird.inv_qyt AS Reciept, Null AS Issued, NULL AS Returns, ird.remarks AS Remarks, ird.inv_manual_number AS Manual
  FROM inventory_reciepts_header AS irh, inventory_reciepts_detail AS ird, inventory AS t
  WHERE 
  ird.inv_id=t.id 
  AND ird.reciept_header_id=irh.id
  UNION ALL
  
   SELECT t.item AS ITEM, iih.issue_date As  [Transaction Date], iid.inventory_id AS ID,NULL AS Reciept, iid.inventory_qyt AS Issued, NULL AS Returns, iid.remarks AS Remarks,Null AS Manual 
  FROM inventory_issue_header AS iih, inventory_issue_detail AS iid,inventory 
  AS t  WHERE  iid.inventory_id=t.id
      AND 
      iid.issue_header_id=iih.id
  
  UNION ALL    
   SELECT t.item AS ITEM, iirh.return_date As  [Transaction Date], iir.item_id AS ID, Null AS Reciept, NULL AS Issued,iir.qyt AS Returns, iir.reasons AS Remarks,Null AS Manual 
  FROM inventory_return_header AS iirh, inventory_return_detail AS iir, inventory AS t
  WHERE      
  iir.item_id=t.id
  AND 
  iir.return_header_id=iirh.id
   ) AS [ITEM Ledger]
  WHERE ID=[Forms]![Reports Window]![cmb_ar]
  and
  [Transaction Date] between [Forms]![Reports Window]![ar_frm_dt] And [Forms]![Reports Window]![ar_to_dt];
  </code></pre>