Heres an example of vba code use to update one combo box from another
Me.comboArea.RowSource = "Select Area.Area_ID, Area.Area, Facility.Facility " & _
"FROM Facility INNER JOIN Area ON Facility.Facility_ID = Area.Facility_ID " & _
"WHERE Area.Facility_ID = " & Me.combofacility.Value & ";"
For the next combo source it require joining many tables which I could build up the SQL slowly.
The complication is using a date (dd/mm/yy) in a combo box and comparing against a yes/no field within a table, see below for details of tables and my problem.
Tables & fields listed below:-
Coach
=====
Coach_ID
Coach_Name
Monday
Tuesday
Wedneday
Thursday
Friday
(Need to workout out from ComboDate which day of week it is and select coach based on checkbox values of days fields
above, if data could be stored in a simpler more efficent way then I could change the database).
Coach_Availability
==================
Coach_Id
Time
(Would map onto the times in combo boxes comboStart & comboEnd)
CoachRates
==========
Coach_Id
Sport_Id
Coach availability is based on
a) Day coach works (Mon - Sunday checkboxes on Coach table against date selected in comboDate)
b) Time of day coach works (Coach_availability table - time field) (Coach_availability values 08:00,08:30,09:00, 09:30, 10:00 etc.., against comboStarttime & comboEndtime)
c) Can coach teach Sport Played ( Coach rates table Sport_id field lookup against sport selected in comboSport)
I arent worried about double booking yet just the criteria above.
Can anyone help?
Hope this makes sense (including relationship diagram)