On Fri, 2006-04-14 at 16:06 -0400, Matt Needles wrote: > Declan Mullen wrote: > > > Hi, > > > > I have a table called "Creatures" with fields "Animal" and "Type". The > > "Animal" field will have values like "Dog", "Cat", "Elephant". The > > "Type" field will have values that depend upon the value of the > > "Animal" field. Eg if "Animal" is "Dog", then "Type" can have values > > like "Boxer", "Poodle", "Labrador". If "Animal" is "Elephant", then > > "Type" can have values like "African", "Indian". > > > > Within my form I would like the "Type" field's combo box drop down > > list to include the relevant values based upon the "Animal" field's > > current value. Ie when "Animal" contains "Dog" then the drop down list > > only consists of "Boxer", "Poodle", "Labrador". > > > > Is this possible ? > > > > Maybe the "Type" field's combo box "List content" property can have > > SQL with an embedded variable that corresponds to the value currently > > in the record's "Animal" field ? > > > > Any tips ? > > > > Regards, > > Declan > > > In my mind, this would require a small database with linked tables.
A single database table as proposed should work ok. In any case, if you really want a List box to change then I'm pretty sure you'll need to do it using a macro. If you want to display or select only relevant types without writing macros, then a sub-form linked to the main form is probably what you need. There's no reason the main and sub-forms can't be based on the same DB table - so that [say] a table (or grid) control in the subform only displays the filtered Type values for the Animal value selected in the main form. See http://www.pitonyak.org/database/ for detailed references for both options. Ross --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
