-
March 31st, 2009, 02:21 AM
#1
detecting value in input text box
Last edited by mahii; April 2nd, 2009 at 12:48 AM.
-
March 31st, 2009, 03:49 AM
#2
Re: detecting value in input text box
This seems weird. I assume that the textbox has been populated with a value on form load or something. In that case, just set a form level variable to the value of the textbox, then on the lost focus event of the textbox simply do a check of the value to the form level variable if they are not the same set cancel = true and display your messagebox or whatever you want to do to tell the user that they need to be the same.
If the user cannot change the value and you are scared that they will, why not disable the textbox which will stop the user overwriting the entry
If you find my answers helpful, dont forget to rate me
-
March 31st, 2009, 09:36 AM
#3
Re: detecting value in input text box
New thread same question but not as much detail.
If you would have answered my question you would have had your answer 2 days ago.
It seems that what you really want is for someone to write your code for you. Since I do this for a living I would be willing to do that but I do not do it for free.
If you want to learn to program then you have to learn to do this yourself and this will never happen if you get others to do it for you.
So far you have been told exactly what code is needed to clear your forms. You have also been given suggestions to use a list or dropdown list for your selections. I even wrote a whole block of code and pointed out that what you were using would not work properly but when you resposted your attempt you were using the old code that was not compatiable with what you wanted to do.
Go back to the other thread and look at the code, suggestions and question posted there. If you want help to finish it then answer the question Otherwise I will nto bother with any more posts on this topic.
-
March 31st, 2009, 10:54 AM
#4
Re: detecting value in input text box
Originally Posted by DataMiser
New thread same question but not as much detail.
If you would have answered my question you would have had your answer 2 days ago.
It seems that what you really want is for someone to write your code for you. Since I do this for a living I would be willing to do that but I do not do it for free.
If you want to learn to program then you have to learn to do this yourself and this will never happen if you get others to do it for you.
So far you have been told exactly what code is needed to clear your forms. You have also been given suggestions to use a list or dropdown list for your selections. I even wrote a whole block of code and pointed out that what you were using would not work properly but when you resposted your attempt you were using the old code that was not compatiable with what you wanted to do.
Go back to the other thread and look at the code, suggestions and question posted there. If you want help to finish it then answer the question Otherwise I will nto bother with any more posts on this topic.
............
Last edited by mahii; April 2nd, 2009 at 12:51 AM.
-
March 31st, 2009, 11:04 AM
#5
Re: detecting value in input text box
I know exactly what you are asking and you have been given code already that will do exactly what you are asking. You have also been given ideas that would work better for you.
I was tryign to help you learn at least a little for yourself but if you refuse to answer even a simple question to aide in this process then it would appear that i am wasting my time.
-
March 31st, 2009, 12:29 PM
#6
Re: detecting value in input text box
Originally Posted by DataMiser
I know exactly what you are asking and you have been given code already that will do exactly what you are asking. You have also been given ideas that would work better for you.
I was tryign to help you learn at least a little for yourself but if you refuse to answer even a simple question to aide in this process then it would appear that i am wasting my time.
thanks brother ,
Last edited by mahii; April 2nd, 2009 at 12:52 AM.
-
March 31st, 2009, 01:49 PM
#7
Re: detecting value in input text box
Look dude I simply asked you a question "Where do you think that code should go" I repeated it several times but you have still not answered it. I wanted to know your answer so I could help you understand what you were doing.
The fact is that it is about the simpliest question you will ever encounter and the answer was right there in front of you the whole time. Is it to much to ask that you apply a little tought and/or effort into solving your problem.
If dataentered is correct then
everything is fine
else
not so fine we need to do something different here
end if
Or select case Value
case correct
everything is fine
case else
everythign is not fine we need to do something
end select
You have been given every line of code to do exactly what you want to do. All you needed to do was place the final 3 lines in the right place, You claimed you tryed it everywhere but of course that is not true because you would have found the right place if you had, It is very very simple to figure out if only you are willing to try. If not then maybe programming is not the area you should be focusing on.
-
March 31st, 2009, 03:44 PM
#8
Re: detecting value in input text box
now you please provide me the code
Last edited by mahii; April 2nd, 2009 at 12:52 AM.
-
March 31st, 2009, 06:25 PM
#9
Re: detecting value in input text box
Use the Keypress Event of the textbox, trap the BACKSPACE KEY, and when it's fired, clear the other forms.
Code:
Private Sub cmdA_Click()
MsgBox "Button A clicked!"
End Sub
Private Sub cmdB_Click()
MsgBox "Button B clicked!"
End Sub
Private Sub cmdC_Click()
MsgBox "Button C clicked!"
End Sub
Private Sub cmdD_Click()
MsgBox "Button D clicked!"
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
' The ASCII values 97 to 122(lowercase) and 65 to 90(Upercase)
Select Case KeyAscii
Case 97 'a
cmdA_Click
Case 98 'b
cmdB_Click
Case 99 'c
cmdC_Click
Case 100 'd
cmdD_Click
Case Else
End Select
End Sub
Otherwise, when v clicks command button, pop up another form with 3 lines of info. When they exit that form (modal), clear the first form.
-
April 1st, 2009, 12:06 AM
#10
Re: detecting value in input text box
Originally Posted by dglienna
Use the Keypress Event of the textbox, trap the BACKSPACE KEY, and when it's fired, clear the other forms.
thanks friend for ur reply and for thanks always to be part of my threads...
Last edited by mahii; April 2nd, 2009 at 12:53 AM.
-
April 1st, 2009, 12:22 AM
#11
Re: detecting value in input text box
Tell ya what...
If you put this in a form:
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
MsgBox KeyAscii
End Sub
You'll be able to figure out the KayAscii of each character...
btw... (You didn't listen to my LISTBOX advice)
-
April 1st, 2009, 02:48 AM
#12
Re: detecting value in input text box
Originally Posted by dglienna
Tell ya what...
If you put this in a form:
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
MsgBox KeyAscii
End Sub
You'll be able to figure out the KayAscii of each character...
btw... (You didn't listen to my LISTBOX advice)
ist of all thank you for ur good responce
Last edited by mahii; April 2nd, 2009 at 03:10 AM.
-
April 1st, 2009, 07:14 AM
#13
Re: detecting value in input text box
Originally Posted by dglienna
Tell ya what...
If you put this in a form:
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
MsgBox KeyAscii
End Sub
You'll be able to figure out the KayAscii of each character...
btw... (You didn't listen to my LISTBOX advice)
brother i have almost done it
Last edited by mahii; April 2nd, 2009 at 03:07 AM.
-
April 1st, 2009, 09:27 AM
#14
Re: detecting value in input text box
You do not need to write code to make the backspace work as a backspace in a text box. That is the normal funtion of the system assuming the cursor is in the correct position.
-
April 1st, 2009, 09:31 AM
#15
Re: detecting value in input text box
ok brother i solved my one problem
Last edited by mahii; April 2nd, 2009 at 03:07 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|