469,616 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

Get runtime error "94" with 1st character capitalization script

To have the first character of a fiels capitalized AfterUppdate, I used
the following script:

Me!City = UCase$(Left$(Me!City, 1)) + Mid$(Me!City, 2)
UCase (Left(Me!City, 1)) + Mid(Me!City, 2)

It works and also when I do not fill anything by ignoring this field
when I jump from one field to antoher with the TAB button.

I only get a script error when I fill someting in the field and then
empty it
with the backspace:

RUNTIME ERROR "94"
INVALID USE OF NULL

How to avoid this?

Using an input mask won't change the situation.

Bart

Nov 13 '05 #1
1 3557
Me!City is null sometimes. You can use NZ to correct that. Also
there is an easier way to get propercase.
try Me!City = strconv(nz(Me!City ,""),vbProperCase)
HTH Pachydermitis

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Martin Goldman | last post: by
9 posts views Thread by Mairhtin O'Feannag | last post: by
3 posts views Thread by Stephen Gennard | last post: by
9 posts views Thread by Charles Crume | last post: by
2 posts views Thread by ghostrider | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.