Dim str As String = "" Dim maxd As Date = DataTables("月度查询").Compute("max(应维护日期)") Dim mind As Date = DataTables("月度查询").Compute("min(应维护日期)") If maxd <> Nothing AndAlso mind <> Nothing Then Do While mind <= maxd str &= Format(maxd, "yyyy年MM月|") maxd = maxd.AddMonths(-1) Loop Dim cbx As WinForm.ComboBox = e.Form.Controls("ComboBox1") cbx.ComboList = str.Trim("|") End If