Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Number field (Access 97)

    This is a stupid question but I am having a brain cramp. I have a table that has a field defined as number and 1 decimal place. When I put 2.5 in the field it keeps reverting back to 2.0. I have defined it as standard, fixed, general etc and I can't enter 2.5.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Number field (Access 97)

    Hi Linda,
    What field size is your field? If it's decimal, you may need to change the scale.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Number field (Access 97)

    Maybe I am missing something but I defined it as number and I don't see any field size. Where do you change the scale?

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Number field (Access 97)

    In table design, at the top you enter field names and types, then underneath there's a list of properties for that field (field size, format etc.) The first one is field size and for a number you can define various sizes (integer, long integer, double and so on).
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Number field (Access 97)

    It is defined as long integer because I use it in a table that has an autonumber key and they say it have to be defined as long integer.

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Number field (Access 97)

    The autonumber key has to be defined as a long integer (which Access will do automatically) but other number fields can be defined as any size you need. If you want decimal places, you can't use an integer field as that will only store whole numbers. You can define your number field as single, double or decimal or else use a currency field rather than a number field, depending on what sort of data you need to store in it.
    For more information you can open up the help menu and type "what data type should I use for a field in my table" (without the quotes) into the answer wizard.
    I hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Number field (Access 97)

    Thanks. I defined it as double and it is fine. I was thinking of the key fields. I said I had a brain cramp. Thanks for a lesson in "Defining fields 101."

Posting Permissions

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