Displaying "all" in list box to view all record

jirrah

Registered User.
Local time
Today, 06:30
Joined
Jan 20, 2003
Messages
23
i have two tables, tblgroups and tblrecipes
on a frmReview i am displaying the groups in a list box so that user selects a group and sees relevant recipes ( which i am displaying in a subform after quering from lstgroups).
Default value for lstgroups is "[lstGroups].[ItemData](0)" so that it always displays first goup recipes... (otherwise subform dont displays anything when i first open the frmReview)
is it possible (which i am sure it is) that when i first open frmreview, the subform displays all recipes in all groups (whole database), so that when i select one group in lstgroups then it run query and filters the desired recipes. May be we can put "all" in lstgroups as first item so that i can use the default value..


thanks in advacne
 
still waiting for any suggestions,...........
 
OK Here you go!
In the properties sheet for the subform, remove whatever you have for a recordSource.
In the OnLoad event for the parent form set the subform's recordsource to a query that calls for all recipes (sorted however).
In the AfterUpdate event of the comboBox, set the sunform's recordSource to a new query that calls for only those records that meet the criteria.

Do you need help with the actual writing of all this?
 
Thanks for reply, and yes please if you can help me, as the two things you mentioned i.e control the record source of an object from anther object/form is new to me...
please note that i am using listbox rather combobox
 

Users who are viewing this thread

Back
Top Bottom