Problem with DLookup on Report

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

Tony Williams

I have a report called rptIDCardForm on which there is a control called
Txt32 that has this Dlookup as its control source
=DLookUp("[txtbusaddress1]","[tblIndividual]","[txtmemnbr]=Reports!rptIDCardForm![txtempmemnumber]")
The report is based on tblindividual but I'm getting #Error in the control
on the report. Can anyone see anything wrong with the above statement?
Thanks
Tony
 
Sorry folks found the problem, typo in a control reference and I've stared
at that for 2 hours!!!! How did I miss it? (I know - senility)
Tony
 
I have a report called rptIDCardForm on which there is a control called
Txt32 that has this Dlookup as its control source
=DLookUp("[txtbusaddress1]","[tblIndividual]","[txtmemnbr]=Reports!rptIDCardForm![txtempmemnumber]")
The report is based on tblindividual but I'm getting #Error in the control
on the report. Can anyone see anything wrong with the above statement?
Thanks
Tony

1) For one thing, make sure the name of this control is not the same
as any field used in it's control source expression.

2) Try the expression this way (the expression should be all on one
line):

=DLookUp("[txtbusaddress1]","[tblIndividual]","[txtmemnbr]=" &
Me![txtempmemnumber])

The above assumes [txtmemnbr] is a Number datatype.

However, if it is a Text datatype, then use:

..... "[txtmemnbr]= '" & Me![txtempmemnumber] & "'")
 
Back
Top