For the bottom error:
In Private Sub ReadDBData, there is this code:
Code:
sQuery = " SELECT Training.[Training ref], Training.[Date], Training.[Name], staff.[Eastwood], staff.[Despatch Op] " & _
"FROM staff Inner Join Training ON staff.Name = Training.Name " & _
"WHERE (((staff.Eastwood)=True) AND ((staff.[Despatch Op])=True));"
There is a semicolon at the end of the SQL for "sQuery". This ends the SQL!
Then there is this code immediately following the above code:
Code:
If StrComp(sFoodType, QUERY_FOOD_TYPE_ALL, vbTextCompare) <> 0 Then
sQuery = sQuery & " WHERE Name = """ & sFoodType & """"
End If
NO SQL string can have 2 WHERE clauses!!
Add a debug statement below the code to see the SQL and set a breakpoint: