J
Janet
I have three forms. FormA is a list of salads with two
buttons that open the same form (FormB). FormB contains
the ingredients for the various salads. FormB has a
datasheet subform (FormBsub) allowing you to add or
delete ingredients.
FormA: tblSalad, saladID, saladName
child/master link of saladID=saladID between FormA/B
FormB: saladID, ingredientID
FormBsub: ingredientID, ingredientTypeID
What I'd like to do is be able to click Button A on FormA
and have FormB appear but only have items listed in
FormBsub with an ingredientTypeID=2 OR if I click Button
B on FormA, have items listed in FormBsub where
ingredientTypeID<>2.
I've been using the doCmd.OpenForm with where clause for
immediate forms, but can you use it for the buttons with
subforms? Maybe set the filter using code on the
subform? Any Ideas?
Many thanks,
Janet
buttons that open the same form (FormB). FormB contains
the ingredients for the various salads. FormB has a
datasheet subform (FormBsub) allowing you to add or
delete ingredients.
FormA: tblSalad, saladID, saladName
child/master link of saladID=saladID between FormA/B
FormB: saladID, ingredientID
FormBsub: ingredientID, ingredientTypeID
What I'd like to do is be able to click Button A on FormA
and have FormB appear but only have items listed in
FormBsub with an ingredientTypeID=2 OR if I click Button
B on FormA, have items listed in FormBsub where
ingredientTypeID<>2.
I've been using the doCmd.OpenForm with where clause for
immediate forms, but can you use it for the buttons with
subforms? Maybe set the filter using code on the
subform? Any Ideas?
Many thanks,
Janet