Input mask syntax in MS Access for uncommon surnames, eg: O'Hara

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello people,

I'm looking for the syntax for Input Masks for surnames that'll allow
uncommon surnames eg; O'Hara, MacCartney

Most Surnames will fit in: >L<?????????????????????????
but with O'Hara I'll have to either write: >L<CCCC>C<????????????????????
which will create a second capital letter in most names: RobinSon
or I'll have to write: >L<C??????????????????????
but then I have a lowercase: O'hara

Is there a character to stop all > and < , so typed text can be entered in
either upper or lower case?

Thanks for your time....
 
I detest all input masks. I would rather use code in the after update event
of a control on a form that would identify potential issues and alert the
user to either edit them or leave them. This would provide much greater
flexibility and would allow using values in tables etc.
 
Hello people,

I'm looking for the syntax for Input Masks for surnames that'll allow
uncommon surnames eg; O'Hara, MacCartney

Most Surnames will fit in: >L<?????????????????????????
but with O'Hara I'll have to either write: >L<CCCC>C<????????????????????
which will create a second capital letter in most names: RobinSon
or I'll have to write: >L<C??????????????????????
but then I have a lowercase: O'hara

Is there a character to stop all > and < , so typed text can be entered in
either upper or lower case?

Thanks for your time....

I'd simply give up on using input masks for this purpose. They're MUCH
too limited. How would you handle names like "de la Vega" or "von
Schmidt"?

What I'll often do is conditionally proper-case names, if the user
enters them in all lower case, using a Form for data entry; in the
name control's AfterUpdate event put code like

Private Sub txtLastName_AfterUpdate()
If StrComp([txtLastName], LCase([txtLastName], 0) = 0 Then
Me.txtLastName = StrConv(Me.txtLastName, vbProperCase)
End If
End Sub

This relies on users entering "O'Hara" and "McDonald" and "de la Vega"
correctly, since it won't mess with them; if the user enters
"mcdonald" or "o'hara" it will be wrong.

John W. Vinson[MVP]
 
Hello Brendan,

I didn't mean to offend the Irish....

Thanks for the coding. I'll have to accept that input masks have their
limitations.
 
Back
Top