設(shè)為首頁收藏本站Access中國

Office中國論壇/Access中國論壇

 找回密碼
 注冊

QQ登錄

只需一步,快速開始

返回列表 發(fā)新帖
樓主: Henry D. Sy
打印 上一主題 下一主題

[Access本身] 動態(tài)分類匯總

[復(fù)制鏈接]
11#
發(fā)表于 2008-12-28 10:36:16 | 只看該作者
感謝分享

點擊這里給我發(fā)消息

12#
發(fā)表于 2008-12-28 11:11:48 | 只看該作者
提示: 作者被禁止或刪除 內(nèi)容自動屏蔽
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
14#
發(fā)表于 2008-12-29 09:11:10 | 只看該作者
牛人,學(xué)習(xí)一下,謝謝了!
15#
發(fā)表于 2008-12-29 16:51:00 | 只看該作者
好好學(xué)習(xí),爭取向上
16#
發(fā)表于 2008-12-29 17:17:40 | 只看該作者
代碼
好多不懂[:27] [:27]
17#
發(fā)表于 2008-12-29 18:31:45 | 只看該作者
好東西一定要分享,謝謝樓豬
18#
發(fā)表于 2008-12-30 15:47:41 | 只看該作者
小弟是原來的提問者,還想跟版主請教一下:
看了代碼,再查一下不懂的語句(我的ACCESS基本就是通過狗狗自學(xué)的,居然還能在公司里拿獎……),差不多就恍然大悟了,但是的確在應(yīng)用VBA方面太差了,版主能不能推薦本書講VBA較經(jīng)典的,通過學(xué)習(xí)此秘笈達到能寫出此段代碼的水平[:33] ,謝謝哈~
19#
發(fā)表于 2008-12-30 15:52:24 | 只看該作者
論壇活躍了不少支持
20#
 樓主| 發(fā)表于 2008-12-30 17:19:54 | 只看該作者
按f1就是經(jīng)典中的經(jīng)典。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則

QQ|站長郵箱|小黑屋|手機版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2025-7-17 05:56 , Processed in 0.099776 second(s), 32 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回復(fù) 返回頂部 返回列表