Private Sub Command1_Click()
If Combo1.Text = "A" And Combo2.Text = "2015" Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\A.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select distinct 营业户数,售电量(千瓦时),应收电费合计(元) from biao1" ' SELECT DISTINCT
Adodc1.Refresh
这个代码就可以显示
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
但是为什么下面这段代码就不行了啊
If Combo1.Text = "A" And Combo2.Text = "2015" Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\A.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select distinct 营业户数,售电量(千瓦时),应收电费合计(元),到户均价(元/千瓦时) from biao1" ' SELECT DISTINCT
Adodc1.Refresh
只是多了一个,到户均价(元/千瓦时)
然后就运行不了了
图片附件: 游客没有浏览图片的权限,请
登录 或
注册