I think you're most of the way there already. Depending on what getEmpStatusID
does you can do something like this
SELECT DISTINCT EmployeeName,SSN,Location,T.SystemAssignedPersonID
FROM dbo_tbl_Random R
Inner JOin Table_Where_Status_Is_Found as T
on T.SystemAssignedPersonID = R.SystemAssignedPersonID
WHERE MenuUsed = 'Random' and T.SystemAssignedPersonID = 'A'
ORDER BY Location,EmployeeName
Use that as the rowsource for your form and don't use VBA. Your form will not be updatable because you used distinct
, though. Is that necessary?