D
David Beaver
A combo box is populated with values from a child table (and binds the ID of
the record from the child table to a foreign key). Some records in the child
table are marked Active, some are not. When viewing existing records in the
parent table, the combo box needs to be populated with all records from the
child table so users can view old records. But when adding a new record to
the parent, I only want to Active child values to be included in the combo.
Conceptually, it would be:
If parent record is new
set row source of combo box to "select ID, name from table where
active = yes"
else
set row source of combo box to "select ID, name from table"
I don't exactly know how to pull this off... how to a) test whether the
parent record is new, and b) where to put this code... on form load or form
open or ???
Thanks in advance.
the record from the child table to a foreign key). Some records in the child
table are marked Active, some are not. When viewing existing records in the
parent table, the combo box needs to be populated with all records from the
child table so users can view old records. But when adding a new record to
the parent, I only want to Active child values to be included in the combo.
Conceptually, it would be:
If parent record is new
set row source of combo box to "select ID, name from table where
active = yes"
else
set row source of combo box to "select ID, name from table"
I don't exactly know how to pull this off... how to a) test whether the
parent record is new, and b) where to put this code... on form load or form
open or ???
Thanks in advance.