老师,修改表名代码设置错误。
此主题相关图片如下:2023-12-11 20 36 28.jpg
Dim lst As WinForm.ListBox = e.Form.Controls("ListBox1")
If lst.Items.count > 0 Then
Dim dr As DataRow
Dim igr As Integer = lst.SelectedIndex
Dim pwd As String = lst.SelectedValue
If Inputvalue(pwd,"重命名","请输入视图名称:") Then
dr = DataTables("视图表").find("视图名 = '" & lst.SelectedValue & "'")
dr("视图名称") = pwd
DataTables("视图表").save()
DataTables("视图表").load()
Tables("视图表").fill("SEL ECT * Fro m {视图表} where "房屋出租",False)
e.Form.controls("listbox1").Combolist = DataTables("视图表").GetComboListString("视图名称")
lst.SelectedIndex = igr
End If
End If
[此贴子已经被作者于2023/12/11 20:42:24编辑过]