|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
oh, come on this forum sucks...no1 can help me with a simple task...
![]() |
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Change to UpperCase in Access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|