当学期数大于3个学期,保留3个学期,学期数小于3个学期保留原数,代码怎么改,请指教,谢谢
With e.Sender
.ShowContextStrip(0, .Height, e.Form.Strips("选择学期"))
End With
cmd.C
cmd.CommandText = "Se lect 学期 From {学生转学}"
dt = cmd.ExecuteReader()
If e.Form.Strips.Contains("选择学期") Then
e.Form.Strips("选择学期").Items.Clear() '清除原来的项目
For Each bj As String In dt.GetValues("学期","","学期 Desc")
e.Form.Strips("选择学期").Items.Add(bj, bj, "", StripItemTypeEnum.MenuItem)
Next
End If