Hi, I'm trying to have a report whose range is specified in a form by the user. I managed to do this successfully in the past with just dates, using Access's calendar function and the proper query. However, now I need to be able to specify an exact time as well as the date, for example April 2 6:00 PM to April 11:45 AM.
What complicates things, I believe, is that the date and time must be stored as seperate fields in the table, so I have one field for the date and another for the time at which the record was entered. Is it possible to somehow combine these two fields in the query in order to group by date and time as specified?
I've tried something like [Reports].Date+[Reports].Time Between [Form].Start and [Form].End, but this is not working. Perhaps something similar would get the job done but I can't seem to figure it out. Any help on this would be great.
Thanks...
3 2072
Hi, I'm trying to have a report whose range is specified in a form by the user. I managed to do this successfully in the past with just dates, using Access's calendar function and the proper query. However, now I need to be able to specify an exact time as well as the date, for example April 2 6:00 PM to April 11:45 AM.
What complicates things, I believe, is that the date and time must be stored as seperate fields in the table, so I have one field for the date and another for the time at which the record was entered. Is it possible to somehow combine these two fields in the query in order to group by date and time as specified?
I've tried something like [Reports].Date+[Reports].Time Between [Form].Start and [Form].End, but this is not working. Perhaps something similar would get the job done but I can't seem to figure it out. Any help on this would be great.
Thanks...
Try this ... - Format([Reports].Date & " " & [Reports].Time, "mm/dd/yyyy hh:nn") BETWEEN [Form].Start and [Form].End
Mary
Wow, this worked great - thanks a lot for your help.
Just one more question, along these same lines - how would I be able to query for records entered in the last 12 hours, even if this crosses over into the previous day? For example, at 6 in the morning, query for records since 6pm the previous evening? Thanks again...
Try this ... - WHERE DateDiff("h",Format([Reports].Date & " " & [Reports].Time, "mm/dd/yyyy hh:nn"),Now()) <= 12
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
by: Michelle |
last post by:
Hi all
I have a report which displays staff absences. An absence record has
a start and end date and the type of absence, ie sickness, annual
leave.
I have created a form which allows the...
|
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...
|
by: kaosyeti |
last post by:
i have a report that tracks customer contacts by salespeople at a car
dealership. the contacts are assigned several values, one of which is the
date that they came in. the report is capeable of...
|
by: jennwilson |
last post by:
I am trying to generate a report based on a query that will list any records where an individual has a date listed that matches the specified time for one or both of the date fields. The two fields...
|
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...
|
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...
|
by: dschiewe |
last post by:
Hello,
This is my first time posting on here so I hope I don't ramble too much. I have a complex database that a co-worker and I created 2 years ago and that I have been adding to since then. The...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |