Re: How to have filled data in field started with CAPITAL?



If you would like the keystrokes to be converted to upper case as the user
types them:

1 Set the control's On Key Press property to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Between the "Private Sub..." and "End Sub" lines, enter:

If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If

BTW, do NOT simply use > in the Format property. That makes Access to
display the value in upper case, but does not store the values in upper
case.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <bartvandongen@xxxxxxxxx> wrote in message
news:1121997162.802750.77720@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I want the filled data in a field starts always with a Capital
> character.
>
> Private Sub myfield_AfterUpdate()
> Me!myfield= UCase$(Left$(Me!myfield, 1))
> End Sub
>
> caused the cursor to be moved to the left / last character.
>
> But, it caused also that only 1 character is filled after update:
> Like:
> keyboard > K
> and not
> keyboard > Keyboard
>
> How to solve it?


.



Relevant Pages

  • Re: can anybody teach me vb
    ... >> second row from the bottom of your keyboard, one at the left edge and one ... >> type a character will cause that character to be in upper case". ...
    (comp.lang.basic.visual.misc)
  • Re: Vertical Lines in Cells - Delimited???
    ... On my U.S. keyboard, it's on the right-most key in the "Q" row as the upper ... the screen it's a one-part "vertical line" character. ... widths go whacky. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Is there an SPF setting to turn CAPS ON like keyboard key?
    ... yeah, that sounds like what I want to do, but to my knowledge there's no way to get an spf panel display to read/replace a character as soon as it's typed. ... Is there an SPF setting to turn CAPS ON like keyboard key? ... Granted, in this case, it is possible to upper case ... For IBM-MAIN subscribe / signoff / archive access ...
    (bit.listserv.ibm-main)
  • Re: Question for the cube crowd..
    ... With your upper arms hang relaxed and your forearms perpendicular to ... setting your keyboard at waist level, ... Your monitor is supposed to be at eye level when your head is raised ... In short, if your upper back hurts, adjust your monitor. ...
    (rec.sport.football.college)
  • Re: Combo box auto populate problem with CAPS
    ... character in upper case, inserted into the middle of the string of the found ... The choices in the combo box may be any combination: Upper case, ... find a correct match. ... Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.formscoding)