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作者: goto2008 时间: 2007-8-16 10:49
谢谢指教。。。可以了。。作者: lirui78 时间: 2007-9-19 17:45
还有一个问题就是,如果选择一行纪录,好像也能激发排序的操作?