RE: Dlookup in expression

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • RE: Dlookup in expression
    ... You need to add the field name you want to filter on, in the dlookup. ... "AlienzDDS" wrote: ... > I have an unbound object which looks up a date: ...
    (microsoft.public.access.forms)
  • RE: DLookup issue
    ... Looking again at your dlookup I noticed that you have no field to compare with ... I dont understand your filter. ... >> that query you have two tables with that same field name. ...
    (microsoft.public.access.reports)
  • Re: deepmap?
    ... (lambda (proc filter ls) ... (lambda (prev x) ...
    (comp.lang.scheme)
  • Re: The Condition in a Macro
    ... > The DLookup is not going to filter anything... ... >> Now with your DLookup, for some reason, it has every single record, which ... >>> If you want to read the value from a control on an open form, ...
    (microsoft.public.access.macros)
  • Re: Whats with the thing with the other newsgroup?
    ... Well, it's inversely proportional to the number of groups, innit? ... Crap ... is a wonderful filter. ... Prev by Date: ...
    (rec.collecting.coins)