thorpedosg

MJBag7UF

Aug 6th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Avoiding clashing appointments Access
  2. Employee(Id,name etc)
  3. Appointment(Id,date,time,employee id, clientid etc)
  4. Client(Id,name etc)
  5.  
  6. Timeslots:
  7. EmployeeID ) Primary key
  8. TimeSlot )
  9. JobID - Foreign key
  10. Status ) And so forth
  11. Notes )
  12.  
  13. SELECT TimeSlots.EmployeeID, TimeSlots.TimeSlot, TimeSlots.JobID
  14. FROM TimeSlots
  15. WHERE TimeSlots.EmployeeID=1
  16. AND TimeSlots.TimeSlot Between #2/9/2012 9:0:0# And #2/9/2012 11:30:0#
  17.  
  18. SELECT TimeSlots.EmployeeID, TimeSlots.TimeSlot, TimeSlots.JobID
  19. FROM TimeSlots
  20. WHERE TimeSlots.TimeSlot Between #2/9/2012 9:0:0# And #2/9/2012 9:30:0#
  21.  
  22. RequestStartDate = StartDate
  23.  
  24. RequestStartTime = StartTime
  25. And
  26. RequestDate = BookingDate
  27.  
  28. dim strWhere as string
  29. dim dtRequeestStartDate as date
  30. dim dtRequestEndDate as date
  31.  
  32. dtRequestStartDate = inputbox("Enter start Date")
  33. dtRequestEndDate = inputbox("Enter end date")
  34.  
  35. strWhere="#" & format(dtRequestStartDate,"mm/dd/yyyy") & "# = StartDate"
  36.  
  37.  
  38. if dcount("*","tableBooking",strWhere) > 0 then
  39. msgbox "sorry, you cant book
  40. ...bla bla bla....
Add Comment
Please, Sign In to add comment