DLookUp expression

  • Thread starter Thread starter AR
  • Start date Start date
A

AR

I tried to creat a field (where the Control Source is an
expression "=DLookUp
("[NOI]","Rent_Roll_Calculation","[Tenant]=[Tenant]")"
in a form with th default view set to "Continuous Forms"
but all i get is the Value or the first record in all the
fields
is there an other way to do this
thank you
 
I tried to creat a field (where the Control Source is an
expression "=DLookUp
("[NOI]","Rent_Roll_Calculation","[Tenant]=[Tenant]")"
in a form with th default view set to "Continuous Forms"
but all i get is the Value or the first record in all the
fields
is there an other way to do this
thank you

What datatype is the [Tenant] field?

If the datatype of the [Tenant] field is text.....
As Control Source of an unbound control on your form:
=DLookUp("[NOI]","Rent_Roll_Calculation","[Tenant]= '" & [Tenant] &
"'")
for clarity, the above quotes are:
"[Tenant]= ' " & [Tenant] & " ' ")

If it is a Number datatype then use....

=DLookUp("[NOI]","Rent_Roll_Calculation","[Tenant]= " & [Tenant])
 
Back
Top