Results 1 to 2 of 2

Thread: DMax issue

  1. #1
    Join Date
    Sep 2006
    Posts
    26

    Unanswered: DMax issue

    I have a query called "MTM Sum", below:

    SELECT Category, sum([Notional_Amount]) AS Notional, sum([-200bp]*1000000) AS 200bpNeg, sum([-100bp]*1000000) AS 100bpNeg, sum([-50bp]*1000000) AS 50bpNeg, sum([-25bp]*1000000) AS 25bpNeg, sum([Base NPV]*1000000) AS Base, sum([+25bp]*1000000) AS 25bpPos, sum([+50bp]*1000000) AS 50bpPos, sum([+100bp]*1000000) AS 100bpPos, sum([+200bp]*1000000) AS 200bpPos
    FROM [MTM Macro Hedge Detail]
    GROUP BY Category;


    I have a report which reports other data, and I want to display data from this query on the side. (The report is tied to a different data source.)

    If I try to display this data on the report using =DMax("200bpNeg","MTM Sum"), I get #Error on the report. If I change the column alias to "ccneg" (roman numerals), and use =DMax("ccneg","MTM Sum"), this properly displays my data on the report. (since the Base_NPV column and the Notional column were the only ones displaying correctly on the initial report, I figured the problem related somehow to having numbers in the column name.) Is this an Access bug, or am I doing something wrong? I would like to use column names that are a little less cryptic, and I don't see why I should not be able to use numbers in the column names. I also tried "200z" as a column name -- this doesn't work, either. (Not that that is descriptive, either, but it lends weight to this being related to having numbers in the column name. "data" works, "data1" does not.)

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    try

    =DMax("[200bpNeg]","MTM Sum")
    Me.Geek = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •