validating question
-
i have a disconected imviroment database application, and normaly i need some validation rules for the data-entry part. i am using the invalidate event to check if the data is in the correct format. the problem is i want to be able to close the form is the data is not in the correct format, but i am not able to because the control refuses to lose focus until the data is in the correct format. please help
rzvme
-
i have a disconected imviroment database application, and normaly i need some validation rules for the data-entry part. i am using the invalidate event to check if the data is in the correct format. the problem is i want to be able to close the form is the data is not in the correct format, but i am not able to because the control refuses to lose focus until the data is in the correct format. please help
rzvme
Your question really answers itself. ;) You have made the choise that the control should not lose focus until the format is correct. Therefore you can not escape from the control until the format is correct. The solution is of course that if you don't want the control to work that way, you change the control so that it doesn't work that way. Implement the validation on form level instead of on field level.
--- Year happy = new Year(2007);
-
Your question really answers itself. ;) You have made the choise that the control should not lose focus until the format is correct. Therefore you can not escape from the control until the format is correct. The solution is of course that if you don't want the control to work that way, you change the control so that it doesn't work that way. Implement the validation on form level instead of on field level.
--- Year happy = new Year(2007);