Results 1 to 6 of 6
  1. #1
    ictcrystal is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    21

    Double booknig cross post

    Hey can someone help me out with this question



    http://www.access-programmers.co.uk/...d.php?t=276168

    i dont know if i should just rewrite it or send the link because seem to be posting the link on my posts??

  2. #2
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    I'm afraid I don't understand the question.

  3. #3
    ictcrystal is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    21
    Hello
    My question is really what is the querytelling me in terms of a double bookings?
    I just dont understand the time field.. i know that the query removes a time for a dentist when somebody tries to book a time already used. but i fail to understand it in this query

  4. #4
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    It doesn't remove anything. I can't see the whole Query, but this looks like a simple SELECT Query. It can only show information, not change, add, or delete information.

    From what little I can see, the Query does nothing more than show all bookings for a specific user (dentist) on a given day. That means unless there's more criteria in the Query that you aren't showing, it's up to you to determine if there are double-bookings and remove/reschedule them as necessary.

  5. #5
    ictcrystal is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Mar 2015
    Posts
    21
    the thing idont understand is.. why has it got the whole [forms]. stuff? why not just select the field i dont understand the criterias (forget the double booking situation)

  6. #6
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Ah,

    Those lines beginning with [Forms]! are pointing to specific Controls on a Form that you can fill out to specify the dentist and date in question. Without those two Criteria, the Query would return the entire list of all appointments, for all dates (and all dentists), including ones that have already happened or that are for dentists no longer working there.

    As for why the programmer decided to reference the Form Controls directly in the Query instead of just passing the information as a Filter or WhereCondition, I couldn't tell you. There are times when you actually have to it this way, but they are few and far between. Personally, I try never to use this method as it limits how you can use the Query and, if you have to rename/move anything, it can break stuff in a manner that's hard to troubleshoot.

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

Similar Threads

  1. REST api POST method
    By irade92 in forum Programming
    Replies: 7
    Last Post: 02-03-2015, 03:21 PM
  2. My post was deleted.
    By azeotrope in forum Queries
    Replies: 2
    Last Post: 06-20-2013, 03:34 PM
  3. How to like a post, or thank someone who helped you
    By Matrix in forum Forum Suggestions
    Replies: 0
    Last Post: 11-18-2012, 11:18 AM

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