Provided the form is open when the report is launched you may use code like this in the OnFormat event procedure of the report's section:
If someCondition Then
strData = "data1"
Else
strData = "data2"
End If
Me![TXT1] = Forms!Form1(strData).Value
I put the code into a SetValue Macro and I used the OnFormat Event in the Report Designer for all of the Reports that I want to set the TEXT from the calling Form.
It was easy but I was missing the correct Event from you.
TEK-TIPS!!!!
"It was easy but I was missing the correct Event from you."
I used the method PHV posted, and gave him a star. I used the OnFormat event of the report, as my form stays open below the report. That was it and worked well. Regards
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.