Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    # sign added to end of value (97)

    When I type:

    tempSAP = 60614907704

    I get this instead:

    tempSAP = 60614907704#

    Could someone explain please?

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    Phase of the moon -- check the Help topic titled, "Silly things that happen during a diurnal moon." <img src=/S/brainwash.gif border=0 alt=brainwash width=15 height=15>

    When you're keying in the value, are you keying it directly into a table, into a form field, the VBA IDE? If a table, form or query, what is the data type of the underlying field? If you're keying it into a form field, is there an event of any sort associated with the control that might cause the pound/sharp sign to be appended? Are you keying in just the numeric value in your original post, or the whole text string, "tempSAP = 60614907704"? A little more info, please.
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  3. #3
    Silver Lounger
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,783
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    Now I understand why things systematically go wrong at certain times of the month... <img src=/S/moon.gif border=0 alt=moon width=15 height=15> (Oops, Sorry, Wrong Moon....)
    Gary

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    I checked when I first saw the message - it happens to me in VBA in Access 2000. One thing I did notice is that it is too big to be a long integer (i.e. greater than 2147483647) but doesn't have a decimal point. Maybe Access is confused about what type it should be?

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: # sign added to end of value (97)

    Have a look in Help for Double Data Type, it is described:

    Double (double-precision floating-point) variables are stored as IEEE 64-bit (8-byte) floating-point numbers ranging in value from -1.79769313486232E308 to -4.94065645841247E-324 for negative values and from 4.94065645841247E-324 to 1.79769313486232E308 for positive values. The type-declaration character for Double is the number sign (#).

    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    tempSAP is of long integer type being written in a code module.

  7. #7
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    So...<pre>Dim dblTest1 as Double
    Dim dblTest2 as Double
    Dim dblTest3 as Double
    dblTest1 = 2147483647
    dblTest2 = 2147483648#
    dblTest3 = 60614907704#
    Debug.Print dblTest3 * 2</pre>


    ..even though the IDE places the # at the end of the values, the actual value will be used in calculations. Interesting. Good catch, Pat!
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: # sign added to end of value (97)

    Thanks Shane,
    And how is beautiful Minneapolis these days, I spent about 5 months there from Feb/75 thru Jun/75 and I loved it.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: # sign added to end of value (97)

    Then, like I said, it won't fit. Long ints hold integers from -2147483648 to 2147483647.

Posting Permissions

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