Access交流中心

北京 | 上海 | 天津 | 重庆 | 广州 | 深圳 | 珠海 | 汕头 | 佛山 | 中山 | 东莞 | 南京 | 苏州 | 无锡 | 常州 | 南通 | 扬州 | 徐州 | 杭州 | 温州 | 宁波 | 台州 | 福州 | 厦门 | 泉州 | 龙岩 | 合肥 | 芜湖 | 成都 | 遂宁 | 长沙 | 株洲 | 湘潭 | 武汉 | 南昌 | 济南 | 青岛 | 烟台 | 潍坊 | 淄博 | 济宁 | 太原 | 郑州 | 石家庄 | 保定 | 唐山 | 西安 | 大连 | 沈阳 | 长春 | 昆明 | 兰州 | 哈尔滨 | 佳木斯 | 南宁 | 桂林 | 海口 | 贵阳 | 西宁 | 乌鲁木齐 | 包头 |

如何增加统计信息

张三哥  发表于:2011-10-31 15:19:41  
复制

利用平台编写查询之后,我想在显示结果时再添加一个统计信息,即在窗体下方显示出符合条件的有多少条?

请问如何处理?

 

Top
张三哥 发表于:2011-10-31 15:24:56

查询结果仍然是以“表”来显示,统计信息显示在平台窗体的提示信息里



振宇 发表于:2011-10-31 21:45:36
    If Not IsNull(Me.客户名称) Then
        strWhere = strWhere & "([客户名称] like '*" & Me.客户名称 & "*') AND "
    End If
    If Not IsNull(Me.材料名称) Then
        strWhere = strWhere & "([材料名称] like '*" & Me.材料名称 & "*') AND "
    End If
    If Not IsNull(Me.数量) Then
        strWhere = strWhere & "([数量] like '*" & Me.数量 & "*') AND "
    End If
    If Len(strWhere) > 0 Then
        strWhere = Left(strWhere, Len(strWhere) - 5)
    End If
    Me.[入库表].Form.Filter = strWhere
    Me.[入库表].Form.FilterOn = True
End Sub
Private Sub 清除_Click()
    Dim ctl As Control
    For Each ctl In Me.Controls
        Select Case ctl.ControlType
        Case 材料名称
            If ctl.Locked = False Then ctl.Value = Null
        Case acComboBox
            ctl.Value = Null
        End Select
    Next
    Me.[入库表].Form.Filter = ""
    Me.[入库表].Form.FilterOn = False
    Me.Refresh
        Me.入库日期 = Null
        Me.客户名称 = Null
        Me.材料名称 = Null
        Me.数量 = Null 
End Sub

振宇 发表于:2011-10-31 21:46:48

Private Sub 查询_Click()
    Dim strWhere As String

    strWhere = ""   

    If Not IsNull(Me.入库日期) Then
        strWhere = strWhere & "([入库日期] like '*" & Me.入库日期 & "*') AND "
    End If
    If Not IsNull(Me.客户名称) Then
        strWhere = strWhere & "([客户名称] like '*" & Me.客户名称 & "*') AND "
    End If
    If Not IsNull(Me.材料名称) Then
        strWhere = strWhere & "([材料名称] like '*" & Me.材料名称 & "*') AND "
    End If
    If Not IsNull(Me.数量) Then
        strWhere = strWhere & "([数量] like '*" & Me.数量 & "*') AND "
    End If
    If Len(strWhere) > 0 Then
        strWhere = Left(strWhere, Len(strWhere) - 5)
    End If
    Me.[入库表].Form.Filter = strWhere
    Me.[入库表].Form.FilterOn = True
End Sub
Private Sub 清除_Click()
    Dim ctl As Control
    For Each ctl In Me.Controls
        Select Case ctl.ControlType
        Case 材料名称
            If ctl.Locked = False Then ctl.Value = Null
        Case acComboBox
            ctl.Value = Null
        End Select
    Next
    Me.[入库表].Form.Filter = ""
    Me.[入库表].Form.FilterOn = False
    Me.Refresh
        Me.入库日期 = Null
        Me.客户名称 = Null
        Me.材料名称 = Null
        Me.数量 = Null 
End Sub



张三哥 发表于:2011-11-01 09:14:49

你说的是什么啊?文不对题!



总记录:4篇  页次:1/1 9 1 :