|
- Private Sub cmd导出表格_Click()
- Dim qdf As DAO.QueryDef
- Dim sSQL As String
- If Len(sWhere) <> 0 Then
- sSQL = "SELECT [入库表 查询].* FROM [入库表 查询] Where " & sWhere
- Else
- sSQL = "SELECT [入库表 查询].* FROM [入库表 查询]"
- End If
- Set qdf = CurrentDb.QueryDefs("Q")
- qdf.SQL = sSQL
- qdf.Close
- Set qdf = Nothing
- DoCmd.OutputTo acOutputQuery, "Q", acFormatIIS, , True
- End Sub
- Private Sub cmd清除_Click()
- Dim ctl As Control
- For Each ctl In Me.Controls
- If TypeOf ctl Is TextBox Then
- ctl = Null
- End If
- Next
- sWhere = ""
- Me.入库表_查询_子窗体.Form.FilterOn = False
- End Sub
复制代码 |
|