I have created a form for customer with a command button that will pull up a
form for each workorder, but I am having a problem where every workorder pops
up (no matter which customers). How can I sort the workorders by customer
where only the workorders for a specific customer pops up???
This has nothing to do with "sorting" - that term means "to put a set of
values in a specified sequential order".
You can base your Report, not on the workorder table, but on a Query
referencing a form on your control to pull up reports only for that customer;
something like
=Forms!YourFormName!cboCustomerID
as a criterion on the CustomerID. You'll need to use your own form and control
and fieldnames of course.
Or you can edit the wizard-generated VBA code in the button's Click event to
use a WhereCondition argument - depending on your version, there may be a
default strCriteria variable. If you set it to something like
strCriteria = "[CustomerID] = " & Me!cboCustomerID
it will display the report only for the CustomerID value currently selected in
the combo box named cboCustomerID (again, adjust for your own object names).
John W. Vinson [MVP]