[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Compare Records

Posted on 2011-03-02
4
Medium Priority
?
246 Views
Last Modified: 2012-05-11
Hello:

I have a series of records that list the person and their appointment time. I am trying to do is build a query that lists individual who had multiple appointments within 45 days.

John Smith              10/7/2009 17:51
Mike Don              4/18/2010 4:11
Mike Don              11/13/2010 23:44
Abe Abel              8/1/2010 18:19
Abe Abel              7/13/2010 12:42
Abe Abel               6/24/2010 08:34
Marshall Tucker     7/27/2010 10:30
Kim Dale               8/4/2010 22:28

Thanks
Dan
0
Comment
Question by:RecipeDan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 35018656
Need a better definition.
Do you mean.... for each appointment, did this person have an appointment within the 45 days prior to this one?

or are you specifying a particular 45 day period in which you are looking for people with more than one appointment in that period?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 35018751
For the first meaning you can create a query based on your table and add an extra column which is your version of..


Dcount("*", "tablename", "Personname='" & Personname & "' and apptDate <# " & format(ApptDate, "yyyy-mm-dd") & "# and apptdate>=# " & format(apptdate-45, "yyyy-mm-dd") & "#")

set the criteria for this column to
>0
0
 
LVL 1

Author Comment

by:RecipeDan
ID: 35019044
Hi Peter57:

What I am looking at doing is take the earliest appointment and see if the person returned within 45 days.

For example Abe Abel had an appointment on 6/24/2010 08:34 that was his first appointment . He had two additional appointments on 7/13/2010 12:42 and 8/1/2010 18:19. So he would show on the list because his two additional appointments were within 45 days of the initial one.  


0
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 35054239
To see if the person returned in next 45 days you can modify the expression to..

Dcount("*", "tablename", "Personname='" & Personname & "' and apptDate ># " & format(ApptDate, "yyyy-mm-dd") & "# and apptdate<=# " & format(apptdate+45, "yyyy-mm-dd") & "#")

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question