I'm trying to create a form with a built-in subform for filtering all of our returns data. The check boxes do nothing yet, so we can ignore that for now. What I've tried so far is having a query that pulls all of the fields I want to display from the table sources with a criteria of setting the customer number equal to the combo box value for customer. I only have this criteria in so far for testing purposes - once I get that working, the others should work by same method. Here's my SQL for that query:
Code:
SELECT tblRMAs.RMA_nb, tblRMAs.cust_nb, tblPartsReturned.partNumber, tblRMAs.dateReceived, tblPartsReturned.failureCategory, tblPartsReturned.creditFROM tblRMAs INNER JOIN tblPartsReturned ON tblRMAs.RMA_nb = tblPartsReturned.RMA_nb
WHERE (((tblRMAs.cust_nb)=[Forms]![frmAnalysisPartsCustomers]![cboCust]));
The search button on the form:
Code:
Private Sub btnSearch_Click() Me.subfrmPartsReturnedByCustomers.Requery
End Sub
I also tried that with
Code:
Me.subfrmPartsReturnedByCustomers.Form.Requery
to no avail.
If I remove the WHERE clause, it does show all of the records in the subform, so I know that that is sourcing records correctly. Any ideas what I'm doing wrong?