Results 1 to 14 of 14
  1. #1
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Numeric Digit Precision (2000)

    Are you referring to the two digits that represent the decimal part of the number? And are your fields in the tables that the query works against numeric fields that are either Single or Double? Finally are you using some sort of Format in the control on the report? (BTW - I changed the subject to make it a bit more descriptive.)
    Wendell

  2. #2
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Numeric Digit Precision (2000)

    <P ID="edit" class=small>(Edited by WendellB on 12-Aug-03 08:23. Revised subject to make it more specific)</P> <img src=/S/cooked.gif border=0 alt=cooked width=50 height=46> I have a report based on a query where the fields are standard number with 2 digits. When I view the query it is formatted as I want it showing 2 digits. On the report when I view it the same data is 2 digits but they are 00 instead of the actual number. I have checked all the fields that feed into this query and they are standard number 2 digits. How can I get the digits to accurately display the data?

  3. #3
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    Yes I am referring to the digits of the decimal part of the number.. The fields in the table and query are on a calcualted (avg) field "fixed" at 2 digits. The fields are linked to an AS400 numeric tables. I am not using any formating on the report control.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Numeric Digit Precision (2000)

    Calculated values are handled as either single or double precision floating point numbers - to get a certain format on your report, you will need to use the format property of the control they are being displayed on - note that format doesn't do any rounding or anything. The format should look something like "0.00"
    Wendell

  5. #5
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    I have tried every format and can not get two fields to show the last two digits. The report is built off the same query, (cross tab). The format is the same for all fields, but they do not display the same in the report. I am attaching a snapshot of the report, one pg. (Forget the snapshot, file type not allowed as an attachment.)

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Numeric Digit Precision (2000)

    Zip the snapshot file; you can attach a zip file to a post.

  7. #7
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    Snapshot Zipped!
    Attached Files Attached Files

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Numeric Digit Precision (2000)

    The chart in the report also displays integer values for ADC and Avg_TotalPT. The chart pulls its data directly from the query, not from the report, so it seems that the problem is in the query (if there is a problem at all). Can you post more info on the query, for instance its SQL?

  9. #9
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    I have a snapshot of the query documentation. I did notice one thing on it that I had not idea what it meant. Under the Type for both of the problem fields it states ": Delete Query" I have no idea what that means nor how to change it.
    Attached Files Attached Files

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Numeric Digit Precision (2000)

    The ": Delete Query" is strange - its looks like Access is confused about these two fields, this is certainly not a normal field type.

    I don't know if others have ever seen this, or have bright ideas about this. I don't think I can help without seeing the database. Consider posting a stripped down version of the database if you don't get replies from others within a reasonable amount of time.
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]This will enable Loungers to look at the problem at first hand.

  11. #11
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    Ok it took me a while to whittle this down to 100k.
    Attached Files Attached Files

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Numeric Digit Precision (2000)

    The field LRACCT05 in the table DOTTIE_CENSUS_3XD is defined as Number, subtype Decimal. This is not a native Access type. Access doesn't seem able to handle it correctly in a report, although the queries do. You can get around this by forcing LRACCT05 into a native data type in the design of the query Daily Census /Shifts 6,2,10,MN:

    SumOfLRACCT05: Sum(CLng([LRACCT05]))

  13. #13
    New Lounger
    Join Date
    Aug 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numeric Digit Precision (2000)

    That did the trick. I am not familiar with "CLng" . What are it's uses.
    Thank you very much.

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Numeric Digit Precision (2000)

    CLng is one of the conversion functions available in VBA; this one stands for Convert to Long. It returns (if possible) a Long Integer corresponding to the input. Other conversion functions are CInt, CDbl and CStr, and there are more; you can look them up in the online help.

Posting Permissions

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