473,321 Members | 1,877 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,321 software developers and data experts.

Query - 2 dates in Appointment Schedule Database

Lea
Having a problem with a query within a table for appointment schedules.

In this table tblMeetingInfo are two fields, StartDate and EndDate.

The date information is entered into each of these fields like:
1/12/2005 (This could represent data entered into either field).

Most appointments are one day in duration. In this example, StartDate
would be equal to Enddate: 1/12/2005 to 1/12/2005 (StartDate to
EndDate).

Some appointments are extended. In this example, StartDate would always
be less than (earlier) than EndDate or, conversely, EndDate would
always be greater (later) than StartDate:
1/8/2005 to 1/16/2005 (StartDate to EndDate).

I need to print a report every week listing all the appointments that
fall within that particular weekly time frame.

Is there a way to utilize a query to compare the StartDate and EndDate
of each record to see if any date is between and including the
StartDate and EndDate would qualify and thus be on the report?

I tried in my last query by entering this criteria in the StartDate:
Between [Type the beginning date:] And [Type the Ending Date:]

Example data

StartDate EndDate
1/12/2005 1/21/2005
1/12/2005 1/12/2005
1/8/2005 1/19/2005

Now I need all appointments that fall between the week of 1/16/2005 and
1/22/2005.

Any help appreciated!

Nov 13 '05 #1
3 1605
I asked about the same question in 1999 or 2000, and Albert Kallal gave
me a great answer. You might want to look it up in the archive.

Nov 13 '05 #2
Lea,

Try
([startdate] > beginning date and [strtdate] < ending date) or
[enddate] > beginning date and [enddate] < ending date)
HTH
Sunil Korah

Nov 13 '05 #3
Lea
Looked from 1995 to 2003 and did not find posting. Thanks.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dean | last post by:
I am a developer who works with MS SQL Server a lot, but I'm far from an expert. I am revamping an appointment scheduling system that allows for appointments to reoccur daily, weekly, monthly and...
2
by: Norbert Lieckfeldt | last post by:
I am setting up a database for a friend who's an Optician, using MS Access 2002. All seems to be working well, but I have hit a snag. There's a calculated field both in a form and a query which...
2
by: ormy28 | last post by:
I really need some help with the following problem if anyone would be willing. I need a list box to list the opposite of what appears in a query. Heres the details: My database is for a...
1
by: keri | last post by:
I would like to have a combo box on a form that shows the results of a query, however the query is variable and i am unsure how to do this. I have NO knowledge of code so very basc instructions...
4
by: odavison | last post by:
I'm currently running a crosstab query that displays the total amounts of Appointments that each Consultant. Currently it is Consultant ID as the Rows, and Appointment Date as the top headings,...
6
by: Jim Mandala | last post by:
Using MS Access 2003 with SQL Server 2005 as a backend: I am trying to automatically check for collisions in a table of appointments with an appointment currenlty being saved from the form...
4
gregerly
by: gregerly | last post by:
Hello, I'm not sure how to properly format a query that I need to select some database information. I have two tables, one named "appts" and another "clients". They are linked by client_id. I'm...
2
gregerly
by: gregerly | last post by:
I have posted this over at the MySQL forum with no responses, so I thought I might pick the brains of the PHP gurus... I'm having an issue with an SQL query. Heres what I have: 2 tables,...
11
by: hedges98 | last post by:
The thread title probably isn't very clear but I can't think how to word my problem properly. Here goes: I have a form that has textboxes for users to enter information for first appointments and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.