I have a query that returns info based on month and year.
The full query is
ID — Name — Sum Of TotalFee: TotalFee — Month([tblCloseItem].[DateClosed]) — Year([tblCloseItem].[DateClosed])
I have a form that needs to set the criteria to the Month and Year. I setup the form with a TxtBox called RptMnth. I am trying to get the query look at form with the Folowing codes.
Like (Left([forms]![frmMonthEnd]![RptMnth],2))
Like (Mid([forms]![frmMonthEnd]![RptMnth],3,4))
The text box is to have the month and year put in like MMYYYY so June of 2001 would be 062001.
When the criteria is substituted with just a number like in the month I put 6 and in year I put 2001 it returns all the data needed. I need the criteria to be set from the form. Am I doing something wrong or is there an easier way to get the result I need.
Thanks
Kenny
The full query is
ID — Name — Sum Of TotalFee: TotalFee — Month([tblCloseItem].[DateClosed]) — Year([tblCloseItem].[DateClosed])
I have a form that needs to set the criteria to the Month and Year. I setup the form with a TxtBox called RptMnth. I am trying to get the query look at form with the Folowing codes.
Like (Left([forms]![frmMonthEnd]![RptMnth],2))
Like (Mid([forms]![frmMonthEnd]![RptMnth],3,4))
The text box is to have the month and year put in like MMYYYY so June of 2001 would be 062001.
When the criteria is substituted with just a number like in the month I put 6 and in year I put 2001 it returns all the data needed. I need the criteria to be set from the form. Am I doing something wrong or is there an easier way to get the result I need.
Thanks
Kenny