代码放到表格的currentchanged事件
If e.Table.Current Is Nothing orelse Forms("某某窗口").opened Then '如果Current为Nothing
Return '则返回
End If
If e.Table.Current("答案") = "A" Then 这句错在哪里,
Forms("某某窗口").Controls("Label2").ForeColor= Color.lime
Forms("某某窗口").Controls("Label7").ForeColor= Color.lime
else
Forms("某某窗口").Controls("Label2").ForeColor= Color.white
Forms("某某窗口").Controls("Label7").ForeColor= Color.white
End If