Private Sub Command1_Click()If Option1.Value = True ThenAdodc1.RecordSource = "select 經手人,sum(訂單總金額)as 訂單總金額 ,format(訂單時間,'yyyy-mm') as 訂單時間 from A_xsjl " _& " where format(訂單時間,'yyyy-mm')= '2015-'+'" _+ Trim(Text1.Text) + "'group by 經手人,format(訂單時間,'yyyy-mm')"Adodc1.RefreshSet DataGrid1.DataSource = Adodc1ElseIf Option2.Value = True ThenAdodc1.RecordSource = "select 商品名稱,sum(數量)as 合計銷售數量 from A_xsjl group by 商品名稱 order by 2 desc"Adodc1.RefreshSet DataGrid1.DataSource = Adodc1End IfEnd IfEnd Sub
你好,‘format'不是可以識別到的內置函數名稱 請問下面內容我錯誤在哪里?
慕尼黑8549860
2021-06-30 06:07:07