|
4#
楼主 |
发表于 2007-8-16 09:15:43
|
只看该作者
请大哥赐教,看下面这段代码要如何改?
Option Compare Database
Dim dj As Boolean
Private Sub Form_Click()
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
If Right(ctrl.Controls(0).Caption, 1) = "↓" Or Right(ctrl.Controls(0).Caption, 1) = "↑" Then ctrl.Controls(0).Caption = Left(ctrl.Controls(0).Caption, Len(ctrl.Controls(0).Caption) - 1)
End If
Next
If dj = True Then
DoCmd.DoMenuItem acFormBar, 5, 1, 1, acMenuVer70
Screen.ActiveControl.Controls(0).Caption = Screen.ActiveControl.Controls(0).Caption & "↓"
dj = False
Else
DoCmd.DoMenuItem acFormBar, 5, 1, 0, acMenuVer70
Screen.ActiveControl.Controls(0).Caption = Screen.ActiveControl.Controls(0).Caption & "↑"
dj = True
End If
End Sub |
|