Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking a text box to see is a character has occured 1

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB
Hi,

I want to check a text box to see is a character has occured. If the "-" dash character appears anywhere in the text box then a msg box would be displayed.

Any idea's???
Thankx,
Jonathan
 
Ho Jonathan,

In Access there is an event called keyPress

Private Sub jj_KeyPress(KeyAscii As Integer)
dim s as string
sr = Chr(KeyAscii)

KeyAscii = Asc(UCase(s))
If KeyAscii = 45 Then
MsgBox "Your Message"
End If

end sub

Nick
 
If Instr(1, [TextboxName, &quot;-&quot;) <> 0 then
MsgBox(message)
End If

mac318
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top