主题:菜鸟请高手帮忙查错---为什么不支持单击事件
界面上有dblist控件、dbcombo控件、data控件、标签控件、文本框控件。连上数据库,程序代码如下:
Private Sub Command1_Click()
Data1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
Data1.Recordset.Delete
If Data1.Recordset.EOF = True Then
Data1.Recordset.MoveLast
Else
Data1.Recordset.MoveNext
End If
End Sub
Private Sub Command3_Click()
Data1.Recordset.Close
End Sub
Private Sub DBCombo1_Click(Area As Integer)
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
End Sub
Private Sub DBList1_Click()
Data1.Recordset.Bookmark = DBList1.SelectedItem
End Sub
运行程序后,单击DBList1,出现错误提示“对象不支持该属性或方法”,单击dbcombo1,出现错误提示“该操作被关联对象取消”,详见图示。请指点!谢谢!
Private Sub Command1_Click()
Data1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
Data1.Recordset.Delete
If Data1.Recordset.EOF = True Then
Data1.Recordset.MoveLast
Else
Data1.Recordset.MoveNext
End If
End Sub
Private Sub Command3_Click()
Data1.Recordset.Close
End Sub
Private Sub DBCombo1_Click(Area As Integer)
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
End Sub
Private Sub DBList1_Click()
Data1.Recordset.Bookmark = DBList1.SelectedItem
End Sub
运行程序后,单击DBList1,出现错误提示“对象不支持该属性或方法”,单击dbcombo1,出现错误提示“该操作被关联对象取消”,详见图示。请指点!谢谢!