DlookUp

A

Alain

Hi to all,

I would like to know how to pass a report value to a Dlookup function that
value is a date and every time I get an #Error as a result
here is my syntax:

=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[SR-SommaireImmobilierBaseRent].Report![To]=
& Reports![R-SommaireImmobilier]![Text62]")

TIA
 
A

Alain

Hi again,
I alson tried the following but getting a blank value
=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[SR-SommaireImmobilierBaseRent].Report![To]=#" & Reports![R-SommaireImmobilier]![Text62] & "#")"Alain" <[email protected]> wrote in messagenews:[email protected]...> Hi to all,>> I would like to know how to pass a report value to a Dlookup function thatvalue is a date and every time I get an #Error as a result> here is my syntax:>>=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[SR-SommaireImmobilierBaseRent].Report![To]= & Reports![R-SommaireImmobilier]![Text62]")>> TIA>>>>
 
D

Duane Hookom

What's the name of the field in Q-SommImmo.... you are comparing the date
to?
=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[DateField]=#" &
[Text62] & "#")

I'm not sure why you wouldn't include Q-SummImm... in your report's record
source. This would allow you to add the AnnualRental field to your report.
 
A

Alain

Hi Duane

The field name is Date
The Q-SummImmo... is a sub report that return many records for the same
lease.
the value of [Text62] come from a Dmin function that was already there
before I got involve...
Anyway it seem that I need to rework the entire query behind this report to
make it work properly

Thanks for you input

Duane Hookom said:
What's the name of the field in Q-SommImmo.... you are comparing the date
to?
=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[DateField]=#" &
[Text62] & "#")

I'm not sure why you wouldn't include Q-SummImm... in your report's record
source. This would allow you to add the AnnualRental field to your report.

--
Duane Hookom
MS Access MVP


Alain said:
Hi to all,

I would like to know how to pass a report value to a Dlookup function
that value is a date and every time I get an #Error as a result
here is my syntax:

=DLookUp("[AnnualRental]","Q-SommImmobilierBasicRental","[SR-SommaireImmobilierBaseRent].Report![To]=
& Reports![R-SommaireImmobilier]![Text62]")

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top