I am trying to create a query that asks the user to input [SSN] if the [SSN] matches "Admin" or "Support" in the DutySection field display all records if not then only display the selected [SSN]. I don't remember how to enter an if then statement that will override the select query if a the other condition is met. Any suggestions?
SELECT Personnel.SSN, Personnel.LName, Personnel.FName, Personnel.MI, Personnel.Rank, Personnel.DutySection, Personnel.[Duty Phone], Personnel.Supervisor, Personnel.[Duty Title], Personnel.Shift, Personnel.[Authorize Purchase]
FROM Personnel
WHERE (((Personnel.SSN)=[What is your SSN]));
SELECT Personnel.SSN, Personnel.LName, Personnel.FName, Personnel.MI, Personnel.Rank, Personnel.DutySection, Personnel.[Duty Phone], Personnel.Supervisor, Personnel.[Duty Title], Personnel.Shift, Personnel.[Authorize Purchase]
FROM Personnel
WHERE (((Personnel.SSN)=[What is your SSN]));