Basically, you want the oldest expiration date. So, if these are the fields:
Code:
tblStaff
StaffID
ExDate1
ExDate2
ExDate3
Then this gets you the oldest date for each staff member
Code:
SELECT
StaffID,
IIF(ExDate1 < ExDate2,
IIF(ExDate1 < ExDate3, ExDate1, ExDate3),
IIF(ExDate2 < ExDate3, ExDate2, ExDate3)
) AS OldestDate
FROM tblStaff;
And then use Oldestdate to determine the number of days inactive.
NOTE 1: I'm only testing "less than", because if two expiration dates are the same, then it doesn't matter which one you get.
NOTE 2: I'm assuming all those dates are filled in and not Null, otherwise you'll need to put NZ() around each of the ExDatex fields.