473,417 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

Date Range Report

50
Hello I have attempted to create a date range report from a query called qrycustomerinformation. 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?
Aug 27 '07 #1
19 3899
Scotter
80
Hi, I think I just had the same issue you are having now. Look at this and tell me if its similar to what your trying to do.
http://www.thescripts.com/forum/showthread.php?p=2771747#post2771747

Scotter
Aug 27 '07 #2
ali3n8
50
I am trying to do a similiar thing, but when I pull my reports they come up blank.
Aug 27 '07 #3
Scotter
80
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?

Scotter
Aug 27 '07 #4
ali3n8
50
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?

Scotter

Yes my report is based on a query. Is this what your asking for

SELECT tblcustomerinformation.CustomerID, tblcustomerinformation.[File Status], tblcustomerinformation.[Contact Number], tblcustomerinformation.First, tblcustomerinformation.Last, tblcustomerinformation.Street, tblcustomerinformation.State, tblcustomerinformation.City, tblcustomerinformation.[Zip Code], tblcustomerinformation.Verification, tblcustomerinformation.Consultant, tblcustomerinformation.Closer, tblcustomerinformation.Opener, tblcustomerinformation.Date, tblcustomerinformation.Followup
FROM tblcustomerinformation;
Aug 27 '07 #5
Scotter
80
Yes my report is based on a query. Is this what your asking for

SELECT tblcustomerinformation.CustomerID, tblcustomerinformation.[File Status], tblcustomerinformation.[Contact Number], tblcustomerinformation.First, tblcustomerinformation.Last, tblcustomerinformation.Street, tblcustomerinformation.State, tblcustomerinformation.City, tblcustomerinformation.[Zip Code], tblcustomerinformation.Verification, tblcustomerinformation.Consultant, tblcustomerinformation.Closer, tblcustomerinformation.Opener, tblcustomerinformation.Date, tblcustomerinformation.Followup
FROM tblcustomerinformation;
Ok, try adding WHERE ((([tblcustomerinformation].[Followup])>mydate)); so the last line will look like
Expand|Select|Wrap|Line Numbers
  1. FROM tblcustomerinformation WHERE ((([tblcustomerinformation].[Followup])>mydate)); 
  2.  
Now when you run the report a box should come up asking what mydate is, put in a date that comes before a certian date of one of the records you are looking for and you should get some results. Try that and well see what happens, I'm pretty new to this myself so lets see if we can struggle through :)
Aug 27 '07 #6
ali3n8
50
Ok, try adding WHERE ((([tblcustomerinformation].[Followup])>mydate)); so the last line will look like
Expand|Select|Wrap|Line Numbers
  1. FROM tblcustomerinformation WHERE ((([tblcustomerinformation].[Followup])>mydate)); 
  2.  
Now when you run the report a box should come up asking what mydate is, put in a date that comes before a certian date of one of the records you are looking for and you should get some results. Try that and well see what happens, I'm pretty new to this myself so lets see if we can struggle through :)
I did that and it did not prompt for any date?
Aug 27 '07 #7
Scotter
80
you put it into the SQL view of the Query the report is based on?
Aug 27 '07 #8
ali3n8
50
Yes I did insert it into the sql view.

Thank You
Aug 27 '07 #9
mlcampeau
296 Expert 100+
Yes I did insert it into the sql view.

Thank You
Please indicate the exact results you got after placing the code that Scotter suggested. Did the query run? Did you get an error message?
Aug 27 '07 #10
ali3n8
50
Please indicate the exact results you got after placing the code that Scotter suggested. Did the query run? Did you get an error message?
Ok 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?
Aug 28 '07 #11
Scotter
80
Ok 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?
I would, but I'm no expert
Aug 28 '07 #12
mlcampeau
296 Expert 100+
I would, but I'm no expert
In this case, I would create a separate query, one for your form and one for your report. You did not indicate whether the query worked as you expected when you entered a date in the prompt.
Aug 28 '07 #13
ali3n8
50
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?
Aug 28 '07 #14
mlcampeau
296 Expert 100+
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?
I'm not too familiar with Date functions, but have you tried putting your DateAdd expression in your query instead? Once you do that, then add that field to your report and see what happens. This is getting a bit out of my area but let me know if that works.
Aug 28 '07 #15
ali3n8
50
I have tried entering the formula in the criteria field for the query also, is this what you were speaking of?
Aug 28 '07 #16
mlcampeau
296 Expert 100+
I have tried entering the formula in the criteria field for the query also, is this what you were speaking of?
No, what I meant was, in design view of your query, in the Field row of an empty column, type something like:

FollowupDate: DateAdd("m",3,[OrderEntered])

Then on your report, in the field list, you should see FollowupDate and then add that field on your report instead.
Aug 28 '07 #17
ali3n8
50
Thank you I tried your method and it does work to the extent that it shows the follow up date on my report Im just still not able to pull a report via date range Ive entered this into the critera row for FollowupDate to >=[forms]![frmReport]![txtDateFromfollowupdate] And <=[forms]![frmReport]![txtDateTofollowupdate] I am using a form to enter my date ranges. Unfourtunately I have still been unsucessful in achieve a date range for this paticular report.
Aug 29 '07 #18
ali3n8
50
Actually it did work im just a dee dee and had mispelled somethings in my code. Thank you much I appreciate it.
Aug 29 '07 #19
mlcampeau
296 Expert 100+
Actually it did work im just a dee dee and had mispelled somethings in my code. Thank you much I appreciate it.
I'm glad you got it to work! Good luck with the rest of your project!
Aug 29 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Garyrek | last post by:
Hi I have a requirement where I need to make a report for each auto dealer how many hits they got on specified date range, so for each car detail page I increment the counter and total it while...
6
by: BlackFireNova | last post by:
Using Access 2002 I am writing a report which draws data from several different tables. I can't link all the tables in a query, as some can not be related without truncating the data. I plan...
2
by: Sara | last post by:
I have followed instructions on the http://allenbrowne.com/tips.html for limiting a report to a date range. At the bottom there is a note that says You will end up using this form for all sorts...
10
Cyberdyne
by: Cyberdyne | last post by:
Here is the problem, I have a form with a field named Occurence with a Short Date Value, once entered it subsequently appears in 3 fields SOL1 which adds one year, SOL2 which adds 2 years and...
1
by: irfanali | last post by:
Hallo All, This is a Tool i m tryin to develop at work. I will explain how it works and then the Q I download a report from my ERP Tool on a daily basis and upload it into the Access Tool....
3
by: kmnotes04 | last post by:
Could anyone tell me how to restrict the date range for items that appear on a report? Old items from previous years appear on the report. I was asked to have only this year's items (and beyond)...
7
by: dozingquinn | last post by:
Hello, Is there any way to auto populate the user defined date range into a report? I currently have the criteria "Between And " for a date range field. This prompts the user to enter a date...
5
by: jambonjamasb | last post by:
I am wanting to create a report that summarises the number of items within a date range. For example I have a FIELD called System_Change. This is a drop down COMBOBOX that uses words like unix,...
12
smithj14
by: smithj14 | last post by:
I have a form to enter start and end dates then select a worker name to filter a report. This all works fine and when the report is open in preview mode it shows the date range in the txtboxes on the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.