Hello. I added a text box to a form I have. Is there a way to prevent the
user from using the / or \ characters in that form? Thanks!
Hello. I added a text box to a form I have. Is there a way to prevent the
user from using the / or \ characters in that form? Thanks!
usually i just memorize the values then if it includes something i don't want
i reinstate the old values after update eg.... (this code goes on form
module)
dim CurVal as string
private sub Textbox1_Enter()
curval = textbox1
end sub
private sub Textbox1_afterupdate()
if instr(1,textbox1,"\") > 0 or _
if instr(1,textbox1,"/") > 0 then _
textbox1 = curval
end sub
ben
--
When you lose your mind, you free your life.
"Steph" wrote:
> Hello. I added a text box to a form I have. Is there a way to prevent the
> user from using the / or \ characters in that form? Thanks!
>
>
>
should say if you want to check it as each character is type I would use this
instead
dim CurVal as string
Private sub Textbox1_enter()
curval = textbox1
end sub
Private sub Textbox1_change()
if instr(1,textbox1,"\") > 0 or _
if instr(1,textbox1,"/") > then
textbox1 = curval
curval = textbox1
end if
end sub
that other one only reads after a user enters data and leaves the box, this
checks each character that is typed
--
When you lose your mind, you free your life.
"Steph" wrote:
> Hello. I added a text box to a form I have. Is there a way to prevent the
> user from using the / or \ characters in that form? Thanks!
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks