DLookup error

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
 
T

Tony Williams

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top