in access 2003 how we can use the setfocuse property(we have to lostfocuse from one field with in that we have to setfocuse in same field)
i am using this code but not setfocuse to same field (this is my problem please give proper gidence for this problem) :-
Description about this code:-
Sex field is one combo box in two options male-1;female-2
IND_APPL is one combo box here options are applicable-1;not applicable-0
Expand|Select|Wrap|Line Numbers
- Private Sub IND_APPL_LostFocus()
- If Sex.Value = 1 And IND_APPL.Value = 0 Then
- Form_PHMRC.SIB1.SetFocus
- IND_Line.SetFocus
- Else
- If Sex.Value = 2 And IND_APPL.Value = 1 Then
- IND_N20.SetFocus
- Else
- MsgBox ("CHECK WITH SEX")
- IND_APPL.SetFocus
- End If
- End If
- End Sub
while giving this options Sex.value = 1 and IND_APPL.value = 1 and
Sex.value = 2 and IND_APPL.value = 0 (ELSE block)
it show msgbox CHECK WITH SEX properely
but it is not setfocus to IND_APPL this field (it is setfocuse to next field)
please give to me proper gidence how i will over come this problem