Stuart McLachlan
stuart at lexacorp.com.pg
Thu May 29 06:49:39 CDT 2003
On 29 May 2003 at 1:01, Jamie Kriegel wrote: > Hi Everyone, > > I have what I hope is a very simple question. I have a form with a > subreport (actually two subreports). This form is used in an insurance > database. The first main form lists policy holder info, subform 1 lists all > policies that this particular customer has (auto, life, home, etc.) and > subform 2 list all dependents on whatever policy is in subform 1 (e.g. > subform 1 lists auto policy and subform 2 shows that the policy holder's > wife and son are also on this policy.) Anyway, on subform 2 I have a combo > box where I want to pick the dependent's name (if I'm adding a dependent to > a policy.) My only problem is, the combo box lists EVERY dependent in my > database. How do I filter this combo box to only show the policy holder's > dependents? > Set the record source of the combo to something like "Select DepID, DepName for tblDependants where HolderID = frmPolicyHolder.HolderID" In the On_Current of the main form do a SubForm2.Form!cmbDependants.Requery -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support.