PC Datasheet,
Yup. In the past what I have done is write a function that acts as a filter
and only returns the characters I am interested in. What I am not clear on
from the original post is whether the code is a validation routine on a
form--in which case an input mask would do the trick--or as part of a batch
process where the validation has to happen without human intervention. If
it is the former, then input masks don't require special code, just a
property setting on the control of the form being designed. If it is the
latter, your solution would work.
"PC Datasheet" <spam@nospam.spam> wrote in message
news:lml2c.30879$W74.25043@newsread1.news.atl.eart hlink.net...[color=blue]
> Alan,
>
> Agreed and that's what I said. The poster needs to check for upper and[/color]
lower[color=blue]
> case, the apostrophe and the dash.
>
> Steve
> PC Datasheet
>
>
>
> "Alan Webb" <knogeek@hotmail.com> wrote in message
> news:lQk2c.2$QY1.11825@news.uswest.net...[color=green]
> > PC Datasheet,
> > Almost. Code will be more stable if you don't bother with what you want[/color][/color]
and[color=blue][color=green]
> > only look at the numeric values of what you do want. BTW--input masks[/color][/color]
in[color=blue][color=green]
> > forms handle this rather nicely.
> >
> > "PC Datasheet" <spam@nospam.spam> wrote in message
> > news:KJg2c.30793$W74.29421@newsread1.news.atl.eart hlink.net...[color=darkred]
> > > First of all there are 54 total characters, not 50. 26 upper case, 26,[/color]
> > lower[color=darkred]
> > > case and 1 each for apostrophe and dash.
> > >
> > > Use the Asc Function to check the Ascii value of the entries.[/color][/color][/color]
Uppercase is[color=blue][color=green]
> > 65 to[color=darkred]
> > > 90, lowercase is 97 to 122, the apostrophe is 39 and the dash is 45.
> > >
> > >
> > > --
> > > PC Datasheet
> > > Your Resource For Help With Access, Excel And Word Applications
> > >
resource@pcdatasheet.com
> > >
www.pcdatasheet.com
> > >
> > >
> > > "Ben" <crescent_au@yahoo.com> wrote in message
> > > news:d99e1341.0403060010.4a1a9caf@posting.google.c om...
> > > > Hi all,
> > > >
> > > > In my STUDENT table, I have a field called STUDENT_NAME. I want the
> > > > data in this field to be only alphabets with allowance for ' and -
> > > > ,but nothing else- no digits, no other special characters. The total
> > > > characters allowed are 50.
> > > >
> > > > For example, these are allowed:
> > > > John O'Brian
> > > > Ken Keefe-Knowles Oliver
> > > > Jon Patrick
> > > >
> > > > I tried few different ways but couldn't get the right result. Can
> > > > someone tell me how to do this?
> > > >
> > > > Thanx
> > > > Ben
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]