这样简化一下试试:
Dim r000 As Row = Tables("打辦登記表").Current
If r000 isnot nothing
If r000("流程標記") >= 0 and r000("流程標記") < 6Then
e.Form.Controls("CheckBox" & r000("流程標記")).Checked = e.Form.Controls("CheckBox7").Checked
End If
Dim nm As String = e.Sender.Name
e.Form.Controls("ComboBox1").Value = Nothing
e.Form.Controls("ComboBox1").Enabled = not e.Form.Controls("CheckBox7").Checked
For ck As Integer = 0 To 6
e.Form.Controls("CheckBox" & ck).Enabled = e.Form.Controls("CheckBox7").Checked
e.Form.Controls("CheckBox" & ck).Checked = (nm = "CheckBox" & ck)
Next
e.Form.Controls("ComboBox1").Value = r000("編輯者")
end if