I have a form that I'm using to show sales relating a specified month.
On this form I have 3 combo boxes - One to select the company, one for the
month and one for the year.
I have created a query which takes all the fields from the sales table. I
have added this query as a subform, so that each sale can be seen.
What I was hoping to do is have the subform display the sales once the user
has selected the company, month and year in the combo boxes. On the query, I
have set the criteria for these three fields to match the combo boxes on the
form.
ie: the criteria for the company field is [Forms]![Sales
Figures]![companyName]
However, I can't get the subform to refresh once the user has selected the
three filters and display the relevant data.
Allen Browne - 10 Jan 2008 14:08 GMT
You could use the AfterUpdate event procedure of the combos to Requery the
form, i.e.:
Me.Requery
You may find it more efficient to set the form's Filter, based on whatever
combination of the boxes the user entered something in. Here's an example of
how to code that:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a form that I'm using to show sales relating a specified month.
>
[quoted text clipped - 16 lines]
> However, I can't get the subform to refresh once the user has selected the
> three filters and display the relevant data.