syntax for Dlookup

Lanason

Registered User.
Local time
Today, 03:19
Joined
Sep 12, 2003
Messages
258
can anyone see whats wrong with this syntax

=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & [Report]![rptComplaintCustCAT3]![FAR Number])

this is entered in a report to get round the problem of the memo field being truncated.

:banghead:
 
can anyone see whats wrong with this syntax

=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & [Report]![rptComplaintCustCAT3]![FAR Number])

this is entered in a report to get round the problem of the memo field being truncated.

:banghead:

Is this being done in the report?
If so, replace Report! with Me.

If its not in the report, then it won't work.
You'll need to use a variable to store the value or a function to calculate it
 
I tried

=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & me.[rptComplaintCustCAT3]![FAR Number])
and
=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & me.[FAR Number])

neither worked

it changed =DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & [me].[FAR Number]) and then asked to enter the parameter

thoughts??
 
I found it

=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = " & [FAR Number])

needs to be

=DLookUp("[Defect Explanation]","[Complaints dB]","[FAR Number] = '" & [FAR Number] & "'")

SOLVED :D
 
Ah - the old "Numbers actually a bit of Text" conundrum :)
 
So your FAR number is in fact a text string!
 
Yes - it is prefixed with "FAR":eek:

don't worry I fell for it as well !!!! :cool:
 
Am I being dense? Should it be obvious what FAR means?
 
Gasman, makes sense for those familiar with a "Southern Drawl"...
 

Users who are viewing this thread

Back
Top Bottom