Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Storing Uppercase format (Access 97)

    Hello,

    I would like to know if there is any way of storing UPPERCASE format in a text field (I already have the format property set to display the field in uppercase). The only option I can locate is to run an update query to Format the field into Uppercase.

    I look forward to your response.

    Thanks,

    Jocelyn Browning

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

    Re: Storing Uppercase format (Access 97)

    I usually do this in the form used for data entry (I never let end users enter data directly in a table or query). If it's just for one field, I put code in the AfterUpdate event of the text box bound to the field; if I have several fields that should be converted to upper case, I put code to do it all in the AfterUpdate event of the form.

    Another solution - which I don't like much myself - is to set an input mask on fields (or text boxes) of the form
    >CCCCC
    The > changes all input to upper case, and C can be any character, or remain empty. The disadvantage is that the number of C's you put in the mask limits the number of characters the user can enter - imagine doing this for a field of length 255!

  3. #3
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Storing Uppercase format (Access 97)

    Thanks Hans,

    I have finally tried your solutions and am very happy with the result. Thanks again for the assistance. Sorry to be so long getting back to you.

    Cheers,

    Jocelyn

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Storing Uppercase format (Access 97)

    If you are storing the values in uppercase, but accepting the values in any case, shouldn't you use the BeforeUpdate event of the form to change the case before the data gets written to the tables?
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

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

    Re: Storing Uppercase format (Access 97)

    Bryan,

    You're correct, thank you for pointing that out.

    If you want to change the case at the control level, you should use the AfterUpdate event of the control.
    If you want to change the case at the form level, you should use the BeforeUpdate event of the form.

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Storing Uppercase format (Access 97)

    Jocelyn,

    Just out of curiousity, if you already are formatting that field to display in UpperCase, why is it necessary to actually convert the input to upper case?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Storing Uppercase format (Access 97)

    Mark,

    The data is exported to another application which does not support the display formats in Access. So the data needs to be stored in uppercase.

    Cheers,

    Jocelyn

Posting Permissions

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