Office中国论坛/Access中国论坛
标题:
求助焦点问题
[打印本页]
作者:
forman
时间:
2008-12-9 15:45
标题:
求助焦点问题
输入错误,弹出Msgbox框,按确定后焦点转到了下一个控件,请问怎样才能让焦点保持在当前控件而不跳到下个控件[attach]33745[/attach]?
作者:
zyp
时间:
2008-12-9 15:49
me.当前控件名.setfocus
作者:
forman
时间:
2008-12-9 15:54
试过了··回不去···
作者:
Henry D. Sy
时间:
2008-12-9 16:28
Private Sub asdfas_BeforeUpdate(Cancel As Integer)
Dim intCount As Integer, H As Integer
Dim I As Integer, J As Integer, K As Integer
Dim strArray() As String
intCount = Len(Me.asdfas.Text)
If intCount Mod 2 <> 0 Then
MsgBox "请输入偶数位的数据"
Cancel = True
End If
H = intCount / 2 - 1
ReDim strArray(H)
For I = 0 To intCount - 2 Step 2
strArray(J) = Mid(Me.asdfas.Text, I + 1, 2)
J = J + 1
Next
K = UBound(strArray)
For I = 0 To K
For J = 0 To K
If I <> J Then
If strArray(I) = strArray(J) Then
MsgBox strArray(I) & " 有重复"
Cancel = True
Exit Sub
End If
End If
Next
Next
End Sub
复制代码
作者:
forman
时间:
2008-12-9 16:28
刚想到了 写个SendKeys "+{tab}" 进去就OK了··不知道为什么用ME.控件名.setfocus 回不去
作者:
forman
时间:
2008-12-9 16:30
太感谢你了 DDDDDD···帮我解决了那么多问题··谢谢··
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3