devtha
asked on
LinkChildfields and Masterfields for a Subreport at runtime ( VBA code)
As described in the subject I need to link Master and child fields conditionally at run time
for a Master/Sub report using the VBA code..
Thanks in advance.
for a Master/Sub report using the VBA code..
Thanks in advance.
sorry, the subform container object should be the same name in both lines of code
sfmcontainer
Mike
sfmcontainer
Mike
You have access to these values with:
Forms!FormName.form!sfmNam e.LinkMast erFields = <Enter Value>
Forms!FormName.form!sfmNam e.LinkChil dFields = <Enter Value>
Forms!FormName.form!sfmNam
Forms!FormName.form!sfmNam
ASKER
hello,
I need this for REPORT.
Thanks
I need this for REPORT.
Thanks
ASKER
This would not work on ONFORMAT or ONOPEN
events.
If Not IsNull(PrevBAC) Then
qrySub1686OwnershipPrior.L inkMasterF ields = "PrevLocPoint;PrevPlanNumb er;FileDat e"
qrySub1686OwnershipPrior.L inkChildFi elds = "LocationPoint;PlanNumber; filedate"
Else
qrySub1686OwnershipPrior.L inkMasterF ields = "LocationPoint;PlanNumber; filedate"
qrySub1686OwnershipPrior.L inkChildFi elds = "LocationPoint;PlanNumber; filedate"
End If
events.
If Not IsNull(PrevBAC) Then
qrySub1686OwnershipPrior.L
qrySub1686OwnershipPrior.L
Else
qrySub1686OwnershipPrior.L
qrySub1686OwnershipPrior.L
End If
ASKER
If I convert the report into a look alike FORM then, that will add to much work. If that is the only soultion I will think about going that way.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Me.sfmContain.LinkMasterFi
Me.sfmContainer.LinkChildF
Mike