Option Base 0
'==========================code==========================
Dim flag As Boolean
Private Sub Command1_Click()
IIf(flag,debug.print Text1.Text,debug.print Text2.text)
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
IIf(index=0,flag=true,flag=false)
End Sub