![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a form and a table is added to the data environment of the form. In the valid event of one of the controls, I have a code snippet. Everytime the code is executed it 'grays out' or disables every other control on the form. If I remove the code, it works just fine. The code snippet 'Seeks' a record in the same table that has been added to the data environment. Would that have something to do with this behavior? |
|
Another question I had was - that based on the result of the code snippet I may want to move focus back to the same control from where the code snippet was executed. In other words if the code snippet determines that the data entered in the text box was not valid, it should not allow the focus to move or the user to tab to the next control. How do I achieve this.? |
#3
| |||
| |||
|
|
Hi - My experience has been in Programminf in FPW 2.6. SO maybe I am doing something wrong. I have a form and a table is added to the data environment of the form. In the valid event of one of the controls, I have a code snippet. Everytime the code is executed it 'grays out' or disables every other control on the form. If I remove the code, it works just fine. The code snippet 'Seeks' a record in the same table that has been added to the data environment. Would that have something to do with this behavior? Another question I had was - that based on the result of the code snippet I may want to move focus back to the same control from where the code snippet was executed. In other words if the code snippet determines that the data entered in the text box was not valid, it should not allow the focus to move or the user to tab to the next control. How do I achieve this.? Thanks in advance |
#4
| |||
| |||
|
|
One little thing Garrett left out. "Remember" the current record number so you can return to it if the seek fails. lnRecno = Recno() SEEK whatever If Not Found() Goto lnRecno Endif This will help make sure you don't land at EOF() if the seek fails. |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |