When ALL control edits are passed, this form can be unloaded or exited. ALL controls, except push buttons, are initialized to values that will fail verification. This is done to require input of valid values.
pbtLoadFocusUTurn
" Unload FOCUS-U-TURN Form . . .
lblComments2
The 'Unload...' push button transfers to a second form that allows this form to be reloaded. The 'Verify and Exit' push button will NOT allow an exit unless ALL edits are passed.
pbtExit
Verify and Exit
pbtExitNoVerify
Exit Without Verify
Text1_Change
Form_Click
Form_Load
nVerifyOK
txtFirstName_Change#
txtFirstName_GotFocus
hgCtlWithFocus
GetFocus
ngVerifyOKE
txtLastName_Change
hsbLeftRight_Change
txtFirstName_LostFocus\
txtFirstNameE
nRetVal
PostMessage
WM_NEXTDLGCTL
lParam
txtLastName_GotFocus+
hsbLeftRight_GotFocus
SendMessage
FALSE
ngCtlFocusIDk
txtLastName
hsbLeftRightq
txtLastName_LostFocusN
hsbLeftRight_LostFocus
Value
nCurrValue
ngCurrValue2
nType
Verifyn
pbtExit_Click
SelStart
Sellength
clbType_Change
clbType_GotFocus
clbType
clbType_LostFocus
csbType
ListIndex
ngCurrIndex
nVerifyAll
lblType_Click
FocusUTurn
Foc001
pbtLoadFocusUTurn_Click
Foc002
lblLeftRightValue
Caption
Command1_Click
pbtExitNoVerify_Click
nMsgOnOff
nMsgOn
pbtExit_GotFocus
pbtLoadFocusUTurn_GotFocus
Label1_Click
Form_Load
1 City
2 County
3 State"
4 Federal"
txtFirstName_GotFocus
This is where we 'think' we are...so all is well...
txtFirstName_LostFocus
Do NOTHING...let GotFocus handle 'Focus U-Turns'...
txtLastName_GotFocus
This is where we 'think' we are...so all is well...
hsbLeftRight_GotFocus
This is where we 'think' we are...so all is well...
txtLastName_LostFocus
Do NOTHING...let GotFocus handle 'Focus U-Turns'...
hsbLeftRight_LostFocus
Do NOTHING...let GotFocus handle 'Focus U-Turns'...
hsbLeftRight_Change
Verify OK...so ignore this...
hsbLeftRight is current control...so do nothing...t
pbtExit_Click
It is somewhat redundant to verify here because validation wasa
already done in the GotFocus event...
Do NOTHING...not interested since no problem...
clbType_Change
Verify OK...so ignore this...
clbType is the current control...so do nothing...
clbType_GotFocus
This is where we 'think' we are...so all is well...
clbType_LostFocus
Do NOTHING...let GotFocus handle 'Focus U-Turns'...
pbtLoadFocusUTurn_Click
It is somewhat redundant to verify here because validation wasa
already done in the GotFocus event...
Do NOTHING...not interested since no problem...
pbtExitNoVerify_Click
pbtExit_GotFocus
All of the events are coded to stop on the FIRST edit error...If it isi
important to see ALL edit errors then another function similar to
FocusUTurn() can be used...However, it is more complicated because it
requires that you KNOW how many errors so that you can actually do theo
'Focus U-Turn' on the last one in addition to displaying the message...
Alternatively, you could build a list of all errors, load-up a listboxs
with the error list and then do the 'Focus U-Turn' via a 'OK' push
button on a modal form...
Current control is OK...so continue checking the other controls...z
Do NOTHING...not interested since no problem...
Already did this one...
No need to do anything more at this point....
pbtLoadFocusUTurn_GotFocus
Current control is OK...so continue checking the other controls...z