vb6 连接数据库报错
程序代码:
On Error Resume Next HouseData.Visible = False ExpenseData.Visible = False If Right(App.path, 1) = "\" Then '连接数据库 HouseData.DatabaseName = App.path + "生活统计.mdb" Else HouseData.DatabaseName = App.path + "\生活统计.mdb" End If HouseData.RecordSource = "房租等消费" '设置记录源 HouseData.Refresh '不知道为什么会提示不支持该属性与方法 '绑定控件 日期.DataField = "日期" 房租.DataField = "房租" 房租.Text = 450 电费.DataField = "电费" 电度.DataField = "电度" 水费.DataField = "水费" 水表.DataField = "水表" ExpenseData.DatabaseName = HouseData.DatabaseName ExpenseData.RecordSource = "消费明细" ExpenseData.Refresh txtdate.DataField = "日期" partname.DataField = "品名" TxtSpecif.DataField = "规格" TxtNum.DataField = "数量" unitprice.DataField = "单价"
我两个表连接的data 控件一样,为什么有一个会报错呢