Dlookup in a subform

mercredi 22 avril 2015

Hi
I am trying to dlookup a field (field name [client]) which is on a form (form name bkpo)

The code i use is this
CLNM = DLookup("[ClientName]", "[BKPOCL]", "[ClCode] ='" & [Forms]![BKPO]![Client] & "'")
It works just perfect however if I use the form BKPO as a subform then the code doesn't work

The form is BK1b
and the subform is BKPO

I tryed this but doesn't work
CLNM = DLookup("[ClientName]", "[BKPOCL]", "[ClCode] ='" & [Forms]![BK1b].[BKPO]![Client] & "'")


Does anyone figure out what's wrong ?
I have tryed several other options like [Forms]![BK1b]!BKPO.[Client] or [Forms].[BK1b]![BKPO]![Client] but nothing
Dlookup in a subform

0 commentaires:

Enregistrer un commentaire

Labels