how to trap? for example in my textfield i don't want my textfield to accept double data type only integer is accepted..i don't have any idea how to do it.. can someone here give me a clue...please a sample code.
churva_churva -9
Junior Poster
Recommended Answers
Jump to PostYou need to write a validation function for that and call the same in the lost focus of the control.
Jump to Postif you only want an integer
if isnumeric(txtr.text) then if int(txtr.text)=val(txtr.text) then OK else msgbox "Only integers please" exit sub end if else msgbox "Please enter a number" exit sub end if
All 7 Replies
debasisdas 580
Posting Genius Featured Poster
churva_churva -9
Junior Poster
debasisdas 580
Posting Genius Featured Poster
churva_churva -9
Junior Poster
debasisdas 580
Posting Genius Featured Poster
churva_churva -9
Junior Poster
ChrisPadgham 113
Posting Whiz
faroukmuhammad
commented:
Useful +3
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.