View Single Post
  #1  
Old September 15th 06, 08:57 PM posted to microsoft.public.outlook.program_forms
nabeyaki-udon
external usenet poster
 
Posts: 5
Default Allow on Numbers in a Textbox

Has anyone done this?

I'm trying to make a textbox called, Year, and it should be the
following:
- Allow Null Values
- Must be 4-digits (numbers), no less or not greater.

I tried using this logic:
If Len(Item.UserProperties("Year").Value) 0 And
Len(Item.UserProperties("Year").Value) 4 And
IsNumeric(Item.UserProperties("Year") = False Then
msgbox("Invalid. Must be 4-digits and no letters")
End If

For some reason it doesn't go through the IsNumeric() part. So I tried
searching for a Key event method and it's seems like Outlook doesn't
have such a thing... or I could be wrong.

Also, I've tried using a Number field, but it keeps default the value
with 0 which I can't get rid of.

Any suggestions? Any thoughts would be much appreciated.

Ads