locked
Clashing Appointment Dates RRS feed

  • Question

  • I am using Allen Browne's "clashing appointment date query

    http://allenbrowne.com/appevent.html

    Works perfectly.

    I do also need for the query to also highlight where the [start] date in one record and the [end] date of other records are equal.

    Thanks for your help

    Friday, November 13, 2015 4:14 PM

Answers

  • I think that you just need to change the >= and the <= to > and <. Instead of

    NoClash: ([tblEvent_1].[Start] >= [tblEvent].[End]) Or
    ([tblEvent_1].[End] <= [tblEvent].[Start]) Or
    ([tblEvent].[LocationID] <> [tblEvent_1].[LocationID]) Or
    ([tblEvent].[EventID] = [tblEvent_1].[EventID])

    use

    NoClash: ([tblEvent_1].[Start] > [tblEvent].[End]) Or
    ([tblEvent_1].[End] < [tblEvent].[Start]) Or
    ([tblEvent].[LocationID] <> [tblEvent_1].[LocationID]) Or
    ([tblEvent].[EventID] = [tblEvent_1].[EventID])

    Matthias Kläy, Kläy Computing AG

    • Marked as answer by Mysteron Friday, November 13, 2015 5:01 PM
    Friday, November 13, 2015 4:42 PM

All replies

  • I think that you just need to change the >= and the <= to > and <. Instead of

    NoClash: ([tblEvent_1].[Start] >= [tblEvent].[End]) Or
    ([tblEvent_1].[End] <= [tblEvent].[Start]) Or
    ([tblEvent].[LocationID] <> [tblEvent_1].[LocationID]) Or
    ([tblEvent].[EventID] = [tblEvent_1].[EventID])

    use

    NoClash: ([tblEvent_1].[Start] > [tblEvent].[End]) Or
    ([tblEvent_1].[End] < [tblEvent].[Start]) Or
    ([tblEvent].[LocationID] <> [tblEvent_1].[LocationID]) Or
    ([tblEvent].[EventID] = [tblEvent_1].[EventID])

    Matthias Kläy, Kläy Computing AG

    • Marked as answer by Mysteron Friday, November 13, 2015 5:01 PM
    Friday, November 13, 2015 4:42 PM
  • Matthias

    Absolutely perfect, worked first time.

    Thank you so much for your reply

    regards

    Mick

    Friday, November 13, 2015 5:02 PM