crewchiefpro6
Programmer
I have a form with many numeric textboxes on it. I have one field that if it changes will update about 20 other fields with new values. That all works great. My problem is after I update the fields I can see the selected field zip through all the textboxes as if I was pressing enter very quickly. I will stop eventually but not always in the same place.
I have code only in the one textbox's valid.
I just recently changed the textbox from the base class provided with FoxPro to one from Marcia and Andy's book (ch 4 txtNumeric).
I cannot seem to be able to SET STEP ON because every field has many events from their class and each time I click on the fields the step goes through each gotfocus, lostfocus etc. There are about 50 textboxes on the form.
The valid code is:
** see if this.value is character, if it is then convert it using val()
LOCAL lnValThisValue
lnValThisValue = 0
IF VARTYPE(THIS.VALUE) = 'C'
lnValThisValue = VAL(THIS.VALUE)
ELSE
lnValThisValue = THIS.VALUE
ENDIF
WITH THISFORM.pageframe1.leasepage
SELECT model
REPLACE lseCash30 WITH lnValThisValue, lseCash36 WITH lnValThisValue, ;
lseCash39 WITH lnValThisValue, lseCash48 WITH lnValThisValue, lseCash60 WITH lnValThisValue
etc., etc, etc.
.REFRESH()
ENDWITH
Like I said, the highlight just takes off and ends up on the other side of the form each time, but not exactly the same place each time, normally between 1 or 2 fields however.
I don't want to change each textboxes class (never tried that one before) and I am sure there is some simple reason it does this.
Don Higgins
I have code only in the one textbox's valid.
I just recently changed the textbox from the base class provided with FoxPro to one from Marcia and Andy's book (ch 4 txtNumeric).
I cannot seem to be able to SET STEP ON because every field has many events from their class and each time I click on the fields the step goes through each gotfocus, lostfocus etc. There are about 50 textboxes on the form.
The valid code is:
** see if this.value is character, if it is then convert it using val()
LOCAL lnValThisValue
lnValThisValue = 0
IF VARTYPE(THIS.VALUE) = 'C'
lnValThisValue = VAL(THIS.VALUE)
ELSE
lnValThisValue = THIS.VALUE
ENDIF
WITH THISFORM.pageframe1.leasepage
SELECT model
REPLACE lseCash30 WITH lnValThisValue, lseCash36 WITH lnValThisValue, ;
lseCash39 WITH lnValThisValue, lseCash48 WITH lnValThisValue, lseCash60 WITH lnValThisValue
etc., etc, etc.
.REFRESH()
ENDWITH
Like I said, the highlight just takes off and ends up on the other side of the form each time, but not exactly the same place each time, normally between 1 or 2 fields however.
I don't want to change each textboxes class (never tried that one before) and I am sure there is some simple reason it does this.
Don Higgins