技術(shù) 點
- 技術(shù)
- 點
- V幣
- 點
- 積分
- 16029
|
13#

樓主 |
發(fā)表于 2008-12-28 11:21:45
|
只看該作者
再增加一個動態(tài)生成行來源
Private Sub Form_Load()
Dim rs As New ADODB.Recordset
Dim strListTRowSource As String
Dim strListDRowSource As String
Dim i As Integer
With rs
.Open "A", CurrentProject.Connection, adOpenKeyset, adLockReadOnly
For i = 0 To .Fields.Count - 1
If .Fields(i).Type = 202 Then
strListTRowSource = strListTRowSource & .Fields(i).Name & ";"
ElseIf .Fields(i).Type = 3 Then
strListDRowSource = strListDRowSource & .Fields(i).Name & ";"
End If
Next
Me.List0.RowSourceType = "Value List"
Me.List2.RowSourceType = "Value List"
Me.List0.RowSource = strListTRowSource
Me.List2.RowSource = strListDRowSource
.Close
End With
Set rs = Nothing
End Sub |
|