Sinfathisar
Registered User.
- Local time
- Today, 06:45
- Joined
- Jan 29, 2009
- Messages
- 60
I need to add a DLookup to my Subreport.
For my text box, Text255, on the Subreport I have tried:
The table Performance_Requirements_Defaults_Table has just one record for lookup. No value is returned when I run the main report.
I found this:
http://access.mvps.org/access/forms/frm0031.htm
and tried adding the lookup code to the main report instead of the Subreport, but I think I am having trouble understanding what they mean here: "Subform1 is the name of the subform CONTROL on mainform" Are they inferring that I need to have a text box on the mainform as well?
I tried using this Me!Subform1.Form!ControlName like this:
I know this is not correct, and I have tried several variations, but I am totally stumped. Everything I have tried with the lookup code in the main report returns "Member Not Found" and Text255 is highlighted. I feel like this should not be such a big problem. Can anyone help my clueless rookie self?
Many thanks in advance for some much needed insight!
For my text box, Text255, on the Subreport I have tried:
Code:
Private Sub Report_Load()
Me.Text255 = DLookup("[Along_line_spacing_%pass]", "Performance_Requirements_Defaults_Table")
I found this:
http://access.mvps.org/access/forms/frm0031.htm
and tried adding the lookup code to the main report instead of the Subreport, but I think I am having trouble understanding what they mean here: "Subform1 is the name of the subform CONTROL on mainform" Are they inferring that I need to have a text box on the mainform as well?
I tried using this Me!Subform1.Form!ControlName like this:
Code:
Me.Text255.QC_Along_Line_Processing_Subreport!Text255 = DLookup("[Along_line_spacing_%pass]", "Performance_Requirements_Defaults_Table")
Many thanks in advance for some much needed insight!