cmd.Commandtext = "SELECT DISTINCT month(日期) as 月份 From {主表} where year(日期) = " & nf.text
看一下:
http://www.foxtable.com/help/topics/1284.htm