Results 1 to 12 of 12
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Memo sizing! (Access 2000 >)

    Hi,
    Memo fields allow up to 65536 characters! Is it possible to change the storage capacity (in any other way) as you can with a text field, as the properties do not give this option?
    I'm always hesitant in using memo, as it increases the DB size and I cannot limit chars to ... say 3000 chars!
    Regards,
    Rudi

  2. #2
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Memo sizing! (Access 2000 >)

    would it help to hard code it into the memo field using VBA? you could limit the size using

    if len(memo)>=3000 then
    msgbox "you're text is too long"
    exit sub
    end if

    in the keypress function? or i guess in the update section instead so it doesn't happen everytime someone presses a button.
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

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

    Re: Memo sizing! (Access 2000 >)

    You can also use the Validation Rule and Validation Text properties. Say that your field is named MyMemo. If you want to limit MyMemo to a maximum of 3000 characters, put this in the Validation Rule property of the field:

    Len([MyMemo])<3001

    and enter an appropriate warning in the Validation Text property, for example

    Do not enter more than 3000 characters!

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Memo sizing! (Access 2000 >)

    Tx for the advice guys.

    I would also like to query the sizing aspect. A text field allows you to specify the amount of characters to store, using the size property. The memo field does not have this! Surely it will not reserve space for ALL 64000 odd characters, even if I only use 3000!!! I recall reading something about the fact that memo fields reserve only the necessary space for characters typed into that field. How true is this? (I.e.... Is it a acceptable practice to have a memo field in a table if necessary? I have always shrugged off from using them as I thought it is not efficient!!)
    Regards,
    Rudi

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

    Re: Memo sizing! (Access 2000 >)

    Unlike text, number, currency and date fields, the contents of a memo field are not stored in the record itself. The record contains a pointer (reference) to the location where the actual contents can be found. The contents are stored in the form of an indication of its length plus the text itself.

    By the way, if you create a text field of length 37, that does not mean that Access reserves 37 bytes in each record. Here too, the contents are stored as an indication of the length plus the text itself.

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Memo sizing! (Access 2000 >)

    Hans, I can't say that your explaination has cleared it up 100%...but lets leave it at that, as I can already see that this is going to go WAY beyond my comprehension of bits and bytes and 1's and 0's.

    PS: I must admit that it sounds very contraversial! The fact that the record contains a pointer (reference) to the location where the actual contents can be found.! If the record is a pointer...then where is the data. (I thought its in the DB)!!
    Pardon my ignorance.... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Regards,
    Rudi

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

    Re: Memo sizing! (Access 2000 >)

    Perhaps the picture below helps a bit. It is not meant as an accurate technical image, but it is intended to give a general idea of how a memo field is stored outside the table itself.

  8. #8
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Memo sizing! (Access 2000 >)

    The data is still in the DATABASE - but NOT in the TABLE. It is held in a separate storage area within the database. The pointer in the field points to the location in this storage area.

  9. #9
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Memo sizing! (Access 2000 >)

    Thx alot guys... I am getting the general picture! I never realized that access operates like this. I always thought the data is written to the tables and stores exclusively there!

    Hans... nice blah blah blah's... <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    Regards,
    Rudi

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

    Re: Memo sizing! (Access 2000 >)

    That is true of everything except memo fields, which are a special kind of datatype.
    Charlotte

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

    Re: Memo sizing! (Access 2000 >)

    OLE fields are also stored outside the table, I think.

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

    Re: Memo sizing! (Access 2000 >)

    Yes, I suppose they are. I never use them, so I forget they exist. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>
    Charlotte

Posting Permissions

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