MS Access: Office 365 vs Office 2016 Issue

Copper Contributor

I have a form that has a dropdown box which is filled with data from another table based on whether the date selected by the user is Sunday, Monday, ... This function works correctly in Office 2016 but when I open the application with Office 365 the functionality does not work, i.e. nothing shows up in the dropdown box. I wonder if the 'iff' function has changed slightly causing the issue. Below the is the SQL View behind the dropdown box. I've also included two images, the first is what it looks like when running Office 2016 and the second when running Office 365.

SELECT tblRoutes.RouteID, tblRoutes.RouteShortName AS Run, tblRoutes.RouteType AS Type, tblRoutes.PullOutTime AS Start, tblRoutes.PullInTime AS [End], tblRoutes.Sunday, tblRoutes.Monday, tblRoutes.Tuesday, tblRoutes.Wednesday, tblRoutes.Thursday, tblRoutes.Friday, tblRoutes.Saturday
FROM tblRoutes
WHERE (((tblRoutes.Sunday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=1,-1,9))) OR (((tblRoutes.Monday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=2,-1,9))) OR (((tblRoutes.Tuesday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=3,-1,9))) OR (((tblRoutes.Wednesday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=4,-1,9))) OR (((tblRoutes.Thursday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=5,-1,9))) OR (((tblRoutes.Friday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=6,-1,9))) OR (((tblRoutes.Saturday)=IIf(Weekday([Forms]![frmDemandResponseAdd]![DateOfTrip])=7,-1,9)))
ORDER BY tblRoutes.RouteShortName;






1 Reply



It is under support in M365, pleas refer this:


IIf Function - Microsoft Support