I took over a project that someone else was working on and for a report that we have it uses VBA to pull information into the report. And that query has criteria. It was giving an error when I did it that way. So I just referenced the table and used an IF statement for the criteria. But the way he has the code the table needs to be sorted for it to work right.