Public Sub cbodropdown([U][B][B]ctl As ComboBox[/B][/B][/U])
ctl.Dropdown
End Sub
Private Sub Form_Load()
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is ComboBox Then
ctl.OnDblClick = "=cbodropdown[U][B](" & ctl.Name & ")"[/B][/U]
End If
Next ctl
End Sub 作者: sunredday 时间: 2003-5-20 17:50
Option Compare Database
Public Sub cbodropdown(ctl As ComboBox)
ctl.Dropdown
End Sub
Private Sub Form_Load()
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is ComboBox Then
ctl.OnDblClick = "=cbodropdown(" & ctl.Name & ")"
End If
Next ctl
End Sub 作者: sunredday 时间: 2003-5-21 06:49
我已经把他放到国外论坛了
http://www.utteraccess.com/forums/showflat.php?Cat=&Board=access_2000&Number=217604&page=0&view=collapsed&sb=5&o=&fpart=1&vc=1&HPSESSID=作者: Trynew 时间: 2003-5-21 17:32
用ctl.name,然后Sub cbodropdown改为:
Public Sub cbodropdown(ctlname As string)
controls(ctlname).Dropdown
End Sub
作者: sunredday 时间: 2003-5-21 18:41
THANK YOU. THE WAY YOU TOUGHT ME IS ONE METHOD TO SOLVE THE QUESTIONG BETWEEN CTL AND IT'S NAME.