老师,下面代码写在CURRENTCHANGED里面,当前行数量大于1时,LABEL背景颜色按条件显示了,
但是,当表中无数据,行数量为0时,LABEL的背景颜色不会变化,是哪里的问题
Dim Int As Integer = DataTables("监控_Table18").Compute("Count(信息编号)") '20170411Dim lbl As WinForm.Label = Forms("监控").Controls("Label34") If Int >= 1 Then lbl.BackColor = Color.SlateBlue Else lbl.BackColor = Color.GrayEnd If