Dim d1,d2 As Date
d1=e.Form.Controls("DateTimePicker1").Value
d2=e.Form.Controls("DateTimePicker2").Value
If d1.Month < Date.Today.Month Then
Tables("工资_Table1").Fill("Select * From {年度工资库} WHERE [日期] between #"& d1 &"# AND #"& d2 &"#",True)
Tables("工资_Table1").Cols("月份").Visible = False
Else
Tables("工资_Table1").Fill("Select * From {当月工资表}",True)
End If
Tables("工资_Table1").AutoSizeCols()
e.Form.Controls("Label9").text = Tables("工资_Table1").Rows.Count
请问红字的select语句应该如何改正?