Results 1 to 4 of 4
  1. #1
    cthurman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    2

    Help with Querying Outstanding Visits

    Hi,




    I am trying to use SQL to write a query that pulls patients that have not come in for their scheduled visit yet. The variable that has the scheduled date is "date_6m_sched" and the variable that would contain the actual visit date is "date_6m_actual". My current syntax won't pull any records, but I know there are at least 11. I want to be able to pull only the records missing before a certain date.


    This is how I wrote it:


    SELECT StudyID as [Study Number], hpv_group as [Study Group], date_6m_sched as [Scheduled Date], date_6m_actual as [Date Came],OtherComments As [Other Comments]
    FROM [Tracking Log]
    WHERE date_6m_actual = FALSE AND date_6m_sched <= [Enter Scheduled Date:]


    Thanks,
    cara

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If date_6m_actual is a date, why are you checking for FALSE?
    Are you trying to check for values where date_6m_actual is not populated?
    If so, then you want:
    Code:
    WHERE date_6m_actual Is Null AND ...

  3. #3
    cthurman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    2
    Okay! This works, Thanks!

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Customer with multiple visits.
    By cotto1968 in forum Forms
    Replies: 4
    Last Post: 03-12-2017, 04:32 PM
  2. Replies: 2
    Last Post: 02-11-2013, 12:05 PM
  3. Outstanding Worker
    By Micky in forum Queries
    Replies: 11
    Last Post: 04-09-2012, 02:14 PM
  4. Number of Days between visits
    By gstullo in forum Queries
    Replies: 5
    Last Post: 12-19-2011, 10:08 AM
  5. Query to show outstanding documents
    By AccessFreak in forum Queries
    Replies: 1
    Last Post: 05-05-2011, 01:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums