General information
Category:
Coding, syntax & commands
To all on the thread,
Thank you very very much for your insights. This has been most educational to me. Traditionally, I have only used lostfocus() in a limited manner - generally to activate/deactivate some form objects, and to set the focus to another object based on the return of the valid() as mentioned in the thread. In that if the valid() did not return .t.; lostfocus would not fire.
However, I now see that certain other actions can be tied with a bit more 'finesse' - using the valid()/lostfocus() match-up. A good example would be the 'client adding' mentioned in the thread. I never thought of putting a oForm.cmdButtonAddClient.Click() event there.
So to sum it up (again correct me if I am wrong):
1) The general rule is to use valid for the contents of the current control for correct data entry.
2) The general rule is to use setfocus to ascertain 'what should happen next' based not only on the contents of the current control; but also other controls/values of the current session as well.
Again, thank you very much for the input. Sometimes these ears need to hear the words of others - instead of these nasty voices in my head telling me to 'guess'.... :-)
Ric
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only