473,472 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Select a date range from a calendar control to generate a report

8 New Member
I have a report that is generated by a query. I have a form with a calendar control. I would like to use the form to force my date range to generate my report. Any suggestions? Do I need to give some more information???

Basically, I would like to set my date range for my report by using a calendar to select the beginning and ending dates.
Jul 3 '07 #1
3 3849
FishVal
2,653 Recognized Expert Specialist
I have a report that is generated by a query. I have a form with a calendar control. I would like to use the form to force my date range to generate my report. Any suggestions? Do I need to give some more information???

Basically, I would like to set my date range for my report by using a calendar to select the beginning and ending dates.
Hi!

You should first decide how do you want to select two dates. Possible ways are:
  • to use two calendar controls for beginning date and ending date
  • to use two additional buttons to retrieve beginning date and ending date respectively from calendar control
  • to use two datepicker controls
  • something else you like
Jul 3 '07 #2
Tarena
8 New Member
Hi!

You should first decide how do you want to select two dates. Possible ways are:
  • to use two calendar controls for beginning date and ending date
  • to use two additional buttons to retrieve beginning date and ending date respectively from calendar control
  • to use two datepicker controls
  • something else you like
I have a form now that you click on a date and then input the number of days you want in the range and it gives you the start date (the date you clicked on) and the end date (the last date in the range). I really don't care, which ever would be the easiest for any user to use. But I do need to be able to see the calendar and click on the days to select them and have it generate the report using the selected dates.
Jul 3 '07 #3
FishVal
2,653 Recognized Expert Specialist
I have a form now that you click on a date and then input the number of days you want in the range and it gives you the start date (the date you clicked on) and the end date (the last date in the range). I really don't care, which ever would be the easiest for any user to use. But I do need to be able to see the calendar and click on the days to select them and have it generate the report using the selected dates.
Something like this
axcCalendar - Calendar control name
txtDays - textbox with number of days

Expand|Select|Wrap|Line Numbers
  1. Private Sub btnOpenReport_Click()
  2.  
  3.     Dim strDocName As String, strCriteria As String
  4.  
  5.     strDocName = "rptReport"
  6.     With Me
  7.         strCriteria = "dteDate >= #" & .axcCalendar & _
  8.             "# AND dteDate < #" & DateAdd("d", Nz(.txtDays), .axcCalendar) & "#"
  9.     End With
  10.  
  11.     Debug.Print strCriteria
  12.     DoCmd.OpenReport strDocName, acPreview, , strCriteria
  13.  
  14. End Sub
  15.  
Jul 3 '07 #4

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

Similar topics

7
by: Mick White | last post by:
According to the Safari browser the world began on "Fri Dec 13 1901 15:45:52 GMT-0500", but I need to be able to get around this limitation. I am interested in dates from 1500 to 1901, as far as...
0
by: ActiveUp | last post by:
http://www.activeup.com/products/components/activecalendar Active Calendar is an ASP.NET server control that allows users to select a date and/or time quickly using a professional looking date...
8
by: Dennis M. Marks | last post by:
What is the maximum valid date range for the date(yyyy,mm,dd) function. -- Dennis M. Marks http://www.dcs-chico.com/~denmarks/ Replace domain.invalid with dcsi.net -----= Posted via...
5
by: BlackFireNova | last post by:
I need to write a report in which one part shows a count of how many total records fall within the working days (Monday - Friday) inside of a (prompted) given date range, in a particular...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
0
by: Arpicheck | last post by:
Hi, I am writing a page that contains a texbox, a calendar, and a rangevalidator. The range validator is testing the textbox for date values. There is an event, set up to fire, when the...
19
by: ali3n8 | last post by:
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...
9
by: Mo | last post by:
After a little PHP education, my first project (to get my feet wet) is making an employee time-tracking program for our small business. *** ANY SUGGESTION, THOUGHTS, OR ADVICE WOULD BE WARMLY...
3
by: Denis | last post by:
I have a field called date . I want to have a drop down box which, when you chick on it, will show a calendar. Upon selecting a date from this calendar it will put the selected date in the...
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,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.