For Each c As Col In Tables("表A").cols If c.name <> "供应商" Then Dim d1 As Date = new Date(c.name.SubString(1,4), c.name.SubString(5,2), 1) Dim d2 As Date = d1.AddMonths(1) Dim filter = "日期 >= #" & d1 & "# and 日期 < #" & d2 & "#" msgbox(filter) End If Next