RE: Dlookup in expression
- From: AlienzDDS <AlienzDDS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 04:40:02 -0700
Thanks Ofer,
It still didn't work. I think it was just too complicated so instead I had
the code create a new table with the records that I needed for this
complicated report/form.
Thanks again for looking at this problem for me.
"Ofer" wrote:
> You need to add the field name you want to filter on, in the dlookup.
>
> Try this
> =DLookUp("[valuation]","[tblportfolio]","[DateFieldName] = #" &
> DMax("[activitydate]","[tblportfolioactivity]","[portfolioid] = " &
> [portfolioid] & " and [valuation] <> 0") & "#")
>
>
>
> "AlienzDDS" wrote:
>
> > I have an unbound object which looks up a date:
> >
> > =DMax("[activitydate]","[tblportfolioactivity]","[portfolioid] = " &
> > [portfolioid] & " and [valuation] <> 0")
> >
> > that part works. But then I want to look up the corresponding [valuation]
> > from that same record. I am trying:
> >
> > =DLookUp("[valuation]","[tblportfolio]",(DMax("[activitydate]","[tblportfolioactivity]","[portfolioid] = " & [portfolioid] & " and [valuation] <> 0")))
> >
> > but it doesn't work.
> >
> > Thanks.
> >
> > Al
.
- Prev by Date: Re: Query via form
- Next by Date: Re: SubForm
- Previous by thread: Re: Query via form
- Next by thread: Don't Allow Editing if a field is populated
- Index(es):
Relevant Pages
|