Combobox value in form to determine criteria for subform

Pedigreeman

Registered User.
Local time
Today, 11:28
Joined
Mar 14, 2011
Messages
57
Hi,

I would like to have a combobox on a form, which allows one to select a year, and upon doing so this will filter the records displayed in the subform so that it only displays those records from the selected year.

To do this, do I need to enter a VBA code into the 'after update' property of the combobox, which requery's the subform, and adds a new 'year' clause to the year column of the underlying query? Or something along these lines? What would the code look like?

Many thanks for your help
 
The wizard should be able to handle this.

Create the subform as a seprate form that has all the data displayed (all years)

Use the tool box to add a subform to your main form and with the wizard that will appear, set the criteria to the year. ie the main form and subform link is that field.

Then, when you change the year in the combo box (main form), the subform should reflect the new data.
 

Users who are viewing this thread

Back
Top Bottom