I have a form with a text box for YTD totals on an employee which is selected from a combo box, the YTD total displays #name? when I run the form. The control source is "=(SELECT Sum(tblPosting. Occurance) FROM tblPosting WHERE (((DatePart("yy yy",[tblPosting].[strdate]))=DatePart("yy yy",[me].[cbodate])))
GROUP BY tblPosting.MstC lock
HAVING (((tblPosting.M stClock)=[me].[empid]));)".
If I put this in a query and run the query it works.
Any help will be greatly appreciated.
GROUP BY tblPosting.MstC lock
HAVING (((tblPosting.M stClock)=[me].[empid]));)".
If I put this in a query and run the query it works.
Any help will be greatly appreciated.
Comment