View Full Version : filtering records in a subform


Coop
12-04-2001, 03:21 AM
Can anyone tell me how to go about filtering records in a subform.

For example, if I have a combo box and type in a Name (lets say filter by name of who created the record).

Any help or advice would be greatly appricated, as I've been stuck on this for a couple of day now, and I'm sick of reading text books.

Fizzio
12-05-2001, 05:45 AM
You could base your subform on a query and set the criteria for the CreatorName field to that of the combobox ie [forms]![MainForm]![ComboboxName]assuming it is based on your main form.
Or you could link the main form and subform by making sure that the same field is present on both forms and then setting the master and child link to the common field (Subform Properties)

HTH

Coop
12-07-2001, 02:36 AM
Thanks for the reply Fizzio,
I sorted this out an other way all the same.
I changed my database structure so as to have three tables, the main form draws it records from one table and the subform from a different table. I changed the recordsource of the main form using an Inner Join to get the equivalent of a filter.

Thanks,
Coop