Hi everybody,
Here is a problem: for convenience in Data Entry I have certain F keys to perform actions. For instance, F9 key saves the data. First it checks validity of the data and if everything is fine, saves it. Otherwise it brings focus to the offending field. So, I type something in the textbox, then press F9 and it gives me the same error again, because field source hasn't yet updated with the value. What can I do? In FormValid always check against form controls and not the actual fields? Is there more convenient method?
Ok, I have an idea: at the top of FormValid method check for ActiveControl, if it has value property set value=value.
Do you think, this would work?
Yep, it does work:
if type('thisform.ActiveControl.value')<>'U'
thisform.ActiveControl.value = thisform.ActiveControl.value
endif
Thanks in advance.
If it's not broken, fix it until it is.
My Blog