Dim HasError As Boolean Dim r As Row = Tables("基本信息").Current If r.IsNull("性别") Then e.Form.Controls("ComboBox1").Error = "你没有选择性别!" HasError = True Else e.Form.Controls("ComboBox1").Error = "" End If If HasError = False Then Forms("窗口1").Open() End If