Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Change to UpperCase in Access

Results 1 to 7 of 7
Share This Thread →
  1. #1
    maljosh is offline Registered User
    Join Date
    Jan 2004
    Location
    London
    Posts
    23
    Rep Power
    0

    Change to UpperCase in Access

    I'm not 100% sure how it's done... i've tried this:

    StrComp(UCase([Postcode]),[Postcode],0)=0

    Basically, if someone typed postcode in LowCase i want access automatically to change it to UpperCase...

    I'd prefer if that was done using coding... if statement would be great. That's what i was trying to do..

    On exit procedure(when you live the field)

    Dim LowerCase, UpperCase
    Dim Postcode As String
    If Postcode.Text = LowerCase Then
    UpperCase = UCase(Postcode)
    Else
    End If

  2. #2
    maljosh is offline Registered User
    Join Date
    Jan 2004
    Location
    London
    Posts
    23
    Rep Power
    0
    oh, come on this forum sucks...no1 can help me with a simple task...

  3. #3
    sbaxter is offline Moderator: Access, SQL
    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    18
    Well for starters you have to remember that all of us have jobs of our own and don't have time to sit here all day waiting in anticipation of answering you question. Most of us are patient enough to know the occasionally it takes more the 2 hours to get a response.

    With that said, I wouldn't even run through an if statement

    Option 1
    WhateverField = Ucase(postcode)

    Option 2

    the input mask to Your field

    >CCC-CCC

    S-

  4. #4
    maljosh is offline Registered User
    Join Date
    Jan 2004
    Location
    London
    Posts
    23
    Rep Power
    0
    I'm sorry mate, but option 1 doesn't work, and i don't know what you mean by option 2,

    for option1 i tried:

    [Postocode]=UCase(Postcode)
    Postcode=UCase(Postocode)

    Nothing worked...

  5. #5
    sbaxter is offline Moderator: Access, SQL
    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    18
    option 2 is an input mask. The input mask is set at the properties level of the field in your table, or on the textbox on your form The says if you enter a postal code as:

    t0j-0b0

    Change it to

    T0J-0B0

    OPtion one is used where you have take the value stored in your field, put it in a variable. then you uppercase the text in your variable and put it where you want it.

    I would use the input mask myself (cleaner)

    S-

  6. #6
    maljosh is offline Registered User
    Join Date
    Jan 2004
    Location
    London
    Posts
    23
    Rep Power
    0
    Thanks a lot mate... i finally did it...

    but u know what? I used the input mask and i only put ">" into format field and that did the trick. However, it wasn't working when i was putting ">CCC-CCC" it would change the postcode l7 4qq into "CCC-CCCL7 4QQ" and for ">CCC" i would get "CCCL7 4QQ"... strange..

    Is it supposed to work that way, anyways, thanks for your time mate,

  7. #7
    sbaxter is offline Moderator: Access, SQL
    Join Date
    Oct 2003
    Posts
    5,126
    Rep Power
    18
    The C is suppose controls the kind of data entry that is allows, At least it doesn for me in the USA, Maybe there is differences between the version sold here and in the UK, I didn't think that was so.

    At least it is working and that is what counts.

    S-

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Replies: 2
    Last Post: January 28th, 2004, 11:14 PM
  2. ASP Crosstab from Access 2000
    By Buckers in forum ASP Development
    Replies: 0
    Last Post: November 22nd, 2003, 10:34 AM
  3. Executed in Access 2000 or Access XP
    By srom in forum Microsoft Access Help
    Replies: 1
    Last Post: October 8th, 2003, 11:47 AM
  4. access levels
    By yessir in forum ASP Development
    Replies: 1
    Last Post: October 8th, 2003, 09:52 AM
  5. Help! sending data from radio button to access (yes/no) data type
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: January 18th, 2002, 04:14 PM

ASP Free Advertisers and Affiliates