Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    USA
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    number data type (A2K)

    Ok, I have a field that is a number data type. Now I am using whole numbers with never a possibility of decimals. In my table I have everything set and it shows the whole number and no decimal places. However, when I try and pull the numbers into a combo box they show two decimal places no matter what I do. Is there anyway to prevent this using a number data type? or do I have to change it to text instead of number? Thanks for the help. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

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

    Re: number data type (A2K)

    If you have set the data type to be a float type then by default you will get two decimal points. If you make it a Long Integer (or other integer type) you won't get that. The other solution is to set the format for the combo box to be "0" which will not display any decimal points even if the number has them.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    USA
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: number data type (A2K)

    Thank you much. It works well now. I have to be retarded not to have figured it out. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  4. #4
    2 Star Lounger
    Join Date
    May 2002
    Location
    USA
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: number data type (A2K)

    ok, now that I got that fixed I'm having a slightly different problem with the same thing. Is there anyway that I can get the 0's to stay at the beginning of the number? I'm sure there is a way I just can't think of it right now. Sorry.

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

    Re: number data type (A2K)

    Yep - just change your format to have however many leading zeros you want - i.e. "000000" will always give you enought leading zeros to make it 6 characters long.
    Wendell

  6. #6
    2 Star Lounger
    Join Date
    May 2002
    Location
    USA
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: number data type (A2K)

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15>ah, thats where my problem was. I was putting it in the input mask instead of the format. I kept thinking that for some reason I had to chose one of the set choices. <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>Appreciate it once again. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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