473,399 Members | 2,774 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,399 software developers and data experts.

Help!! - report to show gpas between dates

12
I have a database where a record has a start date and an end date and is linked to an employee.

Ho do I create a report that will show each employee and gaps between the employees next record start date and end date?

Many thanks, a confuesed Adrian :confused:
Jul 7 '06 #1
5 2476
sashi
1,754 Expert 1GB
Hi there,

below is a simple sample SQL statement dealing with dates.. good luck my fren.. :)

Expand|Select|Wrap|Line Numbers
  1. cmd = _
  2. "SELECT * FROM tData WHERE StationID LIKE '*BOOM*'" & _
  3. "  AND UserID = '" & cmbUserID & "'" & _
  4. "  AND DTG > #" & strStartDate & "#" & _
  5. "  AND DTG < #" & _
  6.      Format(DateAdd("d", 1, strEndDate), "short date") & "#" & _
  7. "ORDER BY DTG;"
  8.  
Jul 7 '06 #2
comteck
179 100+
All you have to do is create a query with the table that has the date values. Drag down into the query the fields you want on the report. Of course, the date would be one of them.

Then, in the "Criteria" box for the date, type the following:

Between [Enter Start Date] And [Enter End Date]

This will prompt you to enter a start date and an end date. Of course, in the table, the data type for this date should be "Date/Time". Make sure you check that.

Lastly, in your report, open the properties, and select this query as the Record Source.

Good Luck.
comteck
Jul 9 '06 #3
AdrianE
12
I've created the query which prompts me for the 2 dates but shows all records not just gaps?

E.g. employee will repeat as many times as there are records but doesnt highlite that there is say a one day gap inbetween record 3 and 4 for that employee?? :confused: :confused: :confused:
Jul 11 '06 #4
comteck
179 100+
Sorry. I think I misunderstood what you were asking. And now, I'm confused. I don't quite get what you're saying about the "gap". Could you be more specific, and maybe include some data to give a better idea of what you're asking.

Thanks.
comteck
Jul 12 '06 #5
AdrianE
12
E.g. table Employees: ID, Name, Address etc

Table Vehicles: Reg, Make, Model

I now enter mileage and start to end dates as Entry fields in a table with lookup values of one "vehicle" and one "employee", e.g "003" "Jo Bloggs" drove "VK03 XXX" between "4/04/06" and "12/04/06".

next entry for same employee was "17 April" to "20th April".

I need to somehow distinguish that for any employee ID if there are any gaps. In the instance of "003" " jo Bloggs" there is no record covering dates 13/04/06 to 16/04/06 and possible many more depending on how many enteries?

:confused:
Jul 26 '06 #6

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

Similar topics

2
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the...
6
by: christopher.secord | last post by:
I have a table containing typed log entries. One log entry is supposed to be created every twelve hours, but sometimes there are gaps. I need to create a report showing the time of entry, and the...
1
by: Dalan | last post by:
I'm developing a report selection form and one of the elements of design is providing Date from/to text boxes. I have a Table that contains all of the information regarding the reports and did...
4
by: Alicia | last post by:
I am having a problem grouping by week. I am looking for the simpliest way of doing it in Microsoft Access. I have tried to use a pre-loaded calender, access did not like it at all. If there is...
5
by: Irfan | last post by:
Hi All, I am trying to create a report but having problem with the critiera selection logic, please help. I have the following fields date1 date2 date3
1
by: josecruz | last post by:
I have to create a summary report that will provide counts and # average of days for multiple "Status" by entering different dates for every criteria. I have created several queries that calculates...
5
by: hwt | last post by:
Hi Please excuse my poor description of the task. I have to make a report for my database. I need to have a report for each month. I need to make it so that each report contains every weekday...
3
by: mlcampeau | last post by:
Hi guys, I am trying to run a query that calculates when employees become eligible for supplemental vacation. This occcurs once the employee has reached 5, 10, 15, etc years of service. I got the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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
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,...
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...

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.