调试
d1.CommandText = "select formid,form,name from SYS_Navigation where ID='" & e.Values("导航id") & "'"
Dim Values1 = cmd1.ExecuteValues
msgbox(Values1.Count)
If Values1.Count > 0 Then
msgbox(Values1("form").tostring = Nothing)
If Values1("form").tostring = Nothing Then
cmd1.CommandText = "update 文书名称表 SET 窗体id = '" & Values1("formid") & "',导航名 = '" & Values1("name") & "' where 导航id='" & e.Values("导航id") & "'"
Else
cmd1.CommandText = "update 文书名称表 SET 窗体id = '" & Values1("form") & "',导航名 = '" & Values1("name") & "' where 导航id='" & e.Values("导航id") & "'"
End If
msgbox(cmd1.CommandText)
cmd1.ExecuteNonQuery()
End If