Hi Rose, let’s see if this will help
You’ve got Combo1 reading [Sox Template], filtering data for Combo2 based on [Specific Temp] – and you want to filter the subform on [Specific Temp] from the second combo. Is that correct? If so, here’s the next steps. (If I got the order wrong, change it to protect the innocent.)
I’ve noticed that filtering a form on the result of a combo is often difficult, so I transfer the information to a hidden textbox and use that as the source of the filter. Also, if you base the subform on a query instead of just the table, you can add the textbox name in the Criteria row as the filter. Then, updating Combo2 updates the textbox, which in turn filters the subform. Here goes…
Create the filter text box.
1. In Design view on the form, which we’ll call frmMain for this exercise, drag a textbox from the Toolbox and place it on the form. It will say Unbound. Right-click the textbox and change these Properties: Name – txtFilter, Visible – False. Save the form and close it.
Set the subform to filter on this textbox.
1. Open the subform in Design view. Go to the Record Source property and click its Builder (…) button. If the subform is based on a query, it will open up without comment. If not, you will be prompted to create a SQL query (or words to that effect). If so, click OK.
2. You should now have a query grid with fields. If not, construct it as you would construct any query.
3. OK, to link to the main form, do this. Find the [Specific Temp] field (assuming that’s what you want to filter – see above). Click the Criteria row, and type Forms![frmMain].[txtFilter] ( you need to give the full address so Access knows where to go…adjust for the real name of your main form) Close and Save when prompted. Close the subform as well, saving when prompted.
Set the Combo filter
1. Re-open the main form in Design view, right-click Combo2, and go to its Properties. Click the Events tab, then select After Update and double-click the blank row to show Event Procedure. Click the Builder button to go the code module.
2. In the blank line at the cursor, type these 2 lines:
txtFilter.Value = Combo2.Value
[Whatever your sub form is called]!Form.Requery
Save and see how you go.
Denis