combo box choice to feed into subform

  • Thread starter misschanda via AccessMonster.com
  • Start date
M

misschanda via AccessMonster.com

Hello,
was able to finally make cascading boxes.. thanks forum.

however, have ran into another issue. I would like the final choice of the
cascade option to feed into a subform.

how is this done

la
 
N

NKTower

Since you said "feed into a subform" I'll assume the final combo box is in
the parent form. Let's call the combo box 'cbo_Final', the subform
sfm_MySubForm, and the target control (presumably a text box) on that form
'txt_Target'. Then

in the form holding the final combo box and the subform, add this code:

Private Sub cbo_Final_Click()
If Not IsNull(cbo_Final) Then
sfm_MySubForm!txt_Target = cbo_Final
End If

If you want t clear the text box if the user clears the combo, then insert

Else
frm_MySubForm!txt_Target = Null

ahead of the END IF
 
M

misschanda via AccessMonster.com

I am not sure if there would be a difference, but the form with the final
combo box is acutally a macro on the main form. The sub form is also on the
main form.

Since you said "feed into a subform" I'll assume the final combo box is in
the parent form. Let's call the combo box 'cbo_Final', the subform
sfm_MySubForm, and the target control (presumably a text box) on that form
'txt_Target'. Then

in the form holding the final combo box and the subform, add this code:

Private Sub cbo_Final_Click()
If Not IsNull(cbo_Final) Then
sfm_MySubForm!txt_Target = cbo_Final
End If

If you want t clear the text box if the user clears the combo, then insert

Else
frm_MySubForm!txt_Target = Null

ahead of the END IF
Hello,
was able to finally make cascading boxes.. thanks forum.
[quoted text clipped - 5 lines]
 
Top