Results 1 to 8 of 8

Thread: Field size (97)

  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field size (97)

    Hi,
    I have a form with a drop down bar that displays different categories. The categories orginate in a table and then are compilied into a list by a select query. Unfortunately when i select categories that are long i get the error message shown. I cant reduce the number of characters in the category. Have you any ideas??
    Cheers for the help in advance,
    Rob.
    Attached Images Attached Images

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

    Re: Field size (97)

    I take it that the combo box is bound to a field. Open the table that contains this field in design view, and increase the size of the field. The default size of a text field is 50 characters, but you can set it to anything from 1 to 255 characters. In this case, 100 is probably sufficient.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field size (97)

    And it doesn't really matter if every field is 255. It doesn't change the space used within the db. Only thing that field size does is enforce a specific size on a field (like 2, for state codes....)

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

    Re: Field size (97)

    I hate to disagree, but it does matter, Drew. I have seen single table queries that threw a "query is too complex" error until the field sizes were reduced or the number of fields in the query were reduced. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Oct 2003
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field size (97)

    Thanks for the help it turns out the field size was set to 15 characters everything works fine now.
    Cheers,
    Rob.

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field size (97)

    Really? I have never seen that. It doesn't make sense either. To Access, a text field is a text field. The size limitation only prevents the amount of data you put in, but Jet reads the data the same way. A text field starts with one byte (which is why the limit is 255 characters), which represents how long the data in that particular record and field is. So if you have 1 character in that record/field, then the first byte is the binary equivalent of 1. If you have 200 characters in the next record, it is prefixed with one byte, the binary equivalent of 200.

    I have seen a query kick up a 'too complex' message when there are too many fields, but not when the field size is 255.

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

    Re: Field size (97)

    When *all* the field sizes were 255, Drew. It must have something to do with a total record length, but I've never delved into the reasons, I just watch out for it.
    Charlotte

  8. #8
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field size (97)

    Hmm, oh well, just have never seen that myself, and I almost always set my Text fields to 255. Go figure.

Posting Permissions

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