Why doesn't this work?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Williams

    #1

    Why doesn't this work?

    I have this DLookup expression in the detailed section of a report
    The report is based on a query Query8 which in turn is based on my table and
    collects the values of txtDomfacsoleqt r and txtMonthlabel and txtcompany.
    The report has a header for txtcompany
    tblmaintabs is my table
    =DLookUp("[tblmaintabs]![txtDomfacsoleqt r]","tblmaintabs" ,"[tblmaintabs]![tx
    tMonthlabel]=[txtqtr1]")
    The report is based on a query Query8 which in turn is based on my table and
    collects the values of txtDomfacsoleqt r and txtMonthlabel
    tblmaintabs is my table
    txtDomfacsoleqt r is a control on the report based upon a field of the same
    name in my table - format fixed number
    txtMonthlabel is a control on the report based upon a field of the same name
    in my table - format date field
    txtqtr1 is a calculated control on my report which is
    =DateAdd("m",-3,[txtmonthlabel]) - format date field

    The Expression returns a value but it is the same value for each detailed
    record.
    TIA
    Tony


  • pietlinden@hotmail.com

    #2
    Re: Why doesn't this work?

    why not just join it in a query to the proper field in your table and
    base the report on the query?

    Comment

    • Tony Williams

      #3
      Re: Why doesn't this work?

      Thanks for the suggestion. I tried to do that but the value of txtqtr1 is
      calculated using =DateAdd("m",-3,[txtmonthlabel]). I tried creating a query
      that calculted this then linked that query with a query based on my table
      but get an error message that says Access cant find txtqtr1 in the DLookup
      expression. So I thought I would try and use both expressions in the report.
      Tony
      <pietlinden@hot mail.com> wrote in message
      news:1109018602 .081484.16120@g 14g2000cwa.goog legroups.com...[color=blue]
      > why not just join it in a query to the proper field in your table and
      > base the report on the query?
      >[/color]


      Comment

      Working...