Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLookUp and Yes/No

Status
Not open for further replies.

Telumendil

Programmer
Sep 8, 2004
12
0
0
CH
When I try to get the value from a Yes/No field with a DlookUp function, the result I become is Yes if DLookUp is successful and No when criteria don't match any record ?

Does anyone know where this problem comes from ?

How should I do to get the value of the field ?
 
How are you testing the result?
The possible results are True/Yes, False/No and Null (if there is no match).

 
Well, it is in a report, and I have both a checkbox and a provisory textbox (format yes/no) in it...

The result is Yes whether the field value is yes or no when the DLookUp criteria match a record and no when they don't...
 
=DLookUp("2004","[LBA Account]","[LBA Account].[LBA_Compte] =" & Compte_N°)
 
Just found out what the problem was...

Opening and closing brackets were necessary...

Correct code is :

=DLookUp("[2004]","[LBA Account]","[LBA Account].[LBA_Compte] =" & Compte_N°)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top