Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Report and Underlying query Questions (Access97 on win95b)

    I have a query which includes the following fields [DDocket] - text and [Quote Amount] - number formatted as currency ($0.00)

    I have 2 calculated fields PreVal: iif(isnull([DDocket]),[Quote Amount],"") and PostVal: iif(isnull([DDocket]),"",[Quote Amount])

    These two calculated fields do not show in currency format. Even when I set each field to Currency, the numbers just move over to the right hand side of the column, but no $0.00 format.

    Also please, How do I sum these fields at the bottom of the report? I have =sum([Preval]) but I get "SQL has invalid data type".
    "Heading for the deep end"

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report and Underlying query Questions (Access97 on win95b)

    Your formatting belongs in the control on the report, not in the query. And you would be better off using a 0 as the default value instead of an empty string. As it it, you've turned the value into a string, and you can't sum a string, which is why you get that message.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Report and Underlying query Questions (Access97 on win95b)

    Once again, Thankyou Charlotte, You have shown me the error of my ways!

    I forgot entirely that using "" would result in a string. I replaced it with 0 and all my problems have disappeared.
    "Heading for the deep end"

Posting Permissions

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