I have a listbox that populated results (ID, Name) from a qry. when the user leaves the box empty it should send all the results from the query that match the criterias to the report and disply them. i get an error message "Join Expression not supported"
If Form_submenu_FacilitySearch.lbCov_facility.Value > 0 Then
sSQLEnd = sSQLEnd & " WHERE mytable.FacilityID = '" & Form_submenu_FacilitySearch.lbCov_facility.Value & "'"
If Form_submenu_FacilitySearch.lbCov_facility.Value = Null Then
sSQLEnd = sSQLEnd & " WHERE mytable.FacilityID=""'"
If Form_submenu_FacilitySearch.checkboxShowDueDate.Va lue = -1 Then
sSQLItems = sSQLItems & ", yourtable.DueDate"
sSQLEnd = sSQLEnd & " AND (((yourtable.DueDate) Between #" & globjEndBox & "# And #" & globjStartBox & "#))"
Report_ComplianceReport.Item3.ControlSource = "DueDate"
I know that the problem is in this part of the code somewhere.
because the qry works Perfect if something is selected in the listbox, but not if its empty.
I tried to add all to the top of the listbox as an option and give it a NULL value, I couldnt get that to work right.
I'm open for suggestions