Hello I have attempted to create a date range report from a query called qrycustomerinfo rmation. The field that contains the value of my date is called Followup. When i run a report on this it is fine. But I have decided I would like to pull this report for a specific date range. Ive attempted to use the method on allen brownes page http://allenbrowne.com/casu-08.html. I would like to also mention the followup field also uses this code to generate a date three months from the date the record is entered =DateAdd("m",3,[Date]). When enter a date range for the report it accepts the range but opens the report with no information on it. When I open the report without the date range method it show me all my records just fine. Im thinking that for some reason that the date range form is not pulling from the field followup. I hope you can understand. What can I do to fix this or is there another method that I can go about creating this date range report?
Date Range Report
Collapse
X
-
Ok, so your report is based on a query correct? And are you putting the date into a form and then runing the report, or no?
If you are using a form, are you doing the same kinda thing where your building your SQL within the form? and what is your querries SQL?
ScotterComment
-
Originally posted by ScotterOk, so your report is based on a query correct? And are you putting the date into a form and then runing the report, or no?
If you are using a form, are you doing the same kinda thing where your building your SQL within the form? and what is your querries SQL?
Scotter
Yes my report is based on a query. Is this what your asking for
SELECT tblcustomerinfo rmation.Custome rID, tblcustomerinfo rmation.[File Status], tblcustomerinfo rmation.[Contact Number], tblcustomerinfo rmation.First, tblcustomerinfo rmation.Last, tblcustomerinfo rmation.Street, tblcustomerinfo rmation.State, tblcustomerinfo rmation.City, tblcustomerinfo rmation.[Zip Code], tblcustomerinfo rmation.Verific ation, tblcustomerinfo rmation.Consult ant, tblcustomerinfo rmation.Closer, tblcustomerinfo rmation.Opener, tblcustomerinfo rmation.Date, tblcustomerinfo rmation.Followu p
FROM tblcustomerinfo rmation;Comment
-
Originally posted by ali3n8Yes my report is based on a query. Is this what your asking for
SELECT tblcustomerinfo rmation.Custome rID, tblcustomerinfo rmation.[File Status], tblcustomerinfo rmation.[Contact Number], tblcustomerinfo rmation.First, tblcustomerinfo rmation.Last, tblcustomerinfo rmation.Street, tblcustomerinfo rmation.State, tblcustomerinfo rmation.City, tblcustomerinfo rmation.[Zip Code], tblcustomerinfo rmation.Verific ation, tblcustomerinfo rmation.Consult ant, tblcustomerinfo rmation.Closer, tblcustomerinfo rmation.Opener, tblcustomerinfo rmation.Date, tblcustomerinfo rmation.Followu p
FROM tblcustomerinfo rmation;
Code:FROM tblcustomerinformation WHERE ((([tblcustomerinformation].[Followup])>mydate));
Comment
-
Originally posted by ScotterOk, try adding WHERE ((([tblcustomerinfo rmation].[Followup])>mydate)); so the last line will look like
Code:FROM tblcustomerinformation WHERE ((([tblcustomerinformation].[Followup])>mydate));
Comment
-
Originally posted by mlcampeauPlease indicate the exact results you got after placing the code that Scotter suggested. Did the query run? Did you get an error message?Comment
-
Originally posted by ali3n8Ok it does prompt me for mydate. But this is causing issue with other functions in my db. I have a search form and now when I open that it prompts me for my date first before I can begin to use a search form. I am assuming that I need to create seperate query for the report rather than running the report from the query I use for my search form. Am I right by saying that?Comment
-
Originally posted by ScotterI would, but I'm no expertComment
-
I have gotten date range to work on several of my reports just one specific one is giving me a problem. Im running the report from a query called followup. When I run this report it comes up blank in order to get data to appear on it I have to switch the report to design view and enter an expression which I will get to. The Fields that I have on this report are:
Followup - Date/Time which has a default value set as =DateAdd("m",3,[Order Entered])
Contact Number - Number
First - Text
Last - Text
Consultant - Text
Now in order to get all fields to show the data on the report I have to switch the report to design view and in the field that says followup on the report I have to enter =DateAdd("m",3,[Order Entered]). Once I add this expression to it the Date Range no longer functions, I dont understand why I would have to do this on the report if the default value for the [Order Entered] Field has already been set to =DateAdd("m",3,[Order Entered]). Is there something that I am not doing properly?Comment
-
Originally posted by ali3n8I have gotten date range to work on several of my reports just one specific one is giving me a problem. Im running the report from a query called followup. When I run this report it comes up blank in order to get data to appear on it I have to switch the report to design view and enter an expression which I will get to. The Fields that I have on this report are:
Followup - Date/Time which has a default value set as =DateAdd("m",3,[Order Entered])
Contact Number - Number
First - Text
Last - Text
Consultant - Text
Now in order to get all fields to show the data on the report I have to switch the report to design view and in the field that says followup on the report I have to enter =DateAdd("m",3,[Order Entered]). Once I add this expression to it the Date Range no longer functions, I dont understand why I would have to do this on the report if the default value for the [Order Entered] Field has already been set to =DateAdd("m",3,[Order Entered]). Is there something that I am not doing properly?Comment
Comment