Thanks for your help - but I must be doing something wrong.
My form is titled "Claims Review". The data is pulled from a union query.
In that form I have a field called "Type of Claim". Right now, until I get
this working, I have two subforms "Claims Review MVA subform" and "Claims
Review WC subform". The house for the subforms is "Child51"; the link
between the subform and the main form is "Case #".
Right now the "Claims Review MVA subform" is set in the subform house with
the "Case #" linked. I have changed the "Type of Claim" field to a combo box
and I added the following code:
Private Sub Type_of_Claim_AfterUpdate()
Dim strSource As String
Select Case [Type of Claim]
Case "WC"
strSource = "Claims Review WC subform"
Case "MVA"
strSource = "Claims Review MVA subform"
End Select
Me.Child51.SourceObject = strSource
End Sub
What did I do wrong - this is not doing anything; I am not even getting an
error message - the subform just remains the orginal one.
BLW
:
And actually to clarify on my other post. You have ONE subform container
control on the main form and then you assign it's SourceObject property to
the applicable subform.
Just realize that the subform container control on the main form is not the
subform but is the container that HOUSES the subform on the main form. So,
you have some flexibility there. Just remember to use its name in the code
when referring to the SourceObject.
See the screenshot here
http://www.btabdevelopment.com/main...rhowtoreferencesubforms/tabid/76/Default.aspx
to clarify what the subform container is.
--
Bob Larson
Access MVP
Access World Forums Administrator
Utter Access VIP
Tutorials at
http://www.btabdevelopment.com
__________________________________
:
I have a form that show various insurance claims; WC, MVA, GL, PL. I have a
subform for each type of claim showing various details of each claim. Is it
possible to have only the corresponding subform show depending upon the type
of claim the current record is?
If it is possible, where would I put the event procedure?
Thanks for any help.
BLW