DLookup error

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I'm trying to reference a control on a subreport in a DLookup formula. This
is my formula
=(DLookUp("[txtletter]","[tblComplaintnbr]","[txtYear]=Reports![rptcomplaintsPage1]![rptcomplaints].[txtYear]")
& [txtrefnbr])

Where rptcomplaintsPage1 is the main report and rptcomplaints is the
subreport and the control txtyear is on the subreport. can anyone see where
I'm going wrong? I've tried using a ! before txtyear and that doesn't work
either.
Thanks
Tony
 
Solved I missed out the last Report! before the control name and I've been
looking at that for 2 hours!!!
Just shows it's best to walk away and come back.
Tony
 
Back
Top