【求助】商品销售的记录的查询问题
界面如图所示,我想的查询有时间项目一起查询还可以统计
程序代码:
Private Sub Command1_Click() If Text1.Text = "" Or Text2.Text = "" And Text3.Text = "" And Combo1.Text = "" Then MsgBox "请输入完整查询信息!" Exit Sub End If '这边应该是查询的部分代码,但是我实在是不会,大家体谅 End Sub Private Sub Form_Load() Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset rs.CursorLocation = adUseClient ConnectionString = "Provider=SQLOLEDB.1;Password=1234;Persist Security Info=True;User ID=sa;Initial Catalog=csjxcglxt;Data Source=TANGJIANQIAO-PC" cn.Open ConnectionString rs.Open "select * from 商品销售表 ", cn, adOpenKeyset, adLockOptimistic Set DataGrid1.DataSource = rs DataGridRows = rs.RecordCount End Sub