照做的例子出错,求助
按照书上的例子做的,报错,新手求助第一个错误
Private Sub Form_Load()
Left = 0
Top = 0
Me.Height = main.ScaleHeight
Me.Width = main.ScaleWidth
With DataGrid1 'datagrid设置尺寸
.Left = 0
.Top = 0
.Height = Me.ScaleHeight
.Width = Me.ScaleWidth
End With
source0 = DataEnvironment1.Recordsets(1).Source
activeconnection0 = DataEnvironment1.Recordsets(1).ActiveConnection
DataEnvironment1.Recordsets(1).Close
DataEnvironment1.Recordsets(1).Open Source, activeconnevtion0, 3, 3(这句报错,参数类型不正确或是不在可接受的氛围之内,或与其他的参数冲突)
End Sub
第二个错误
Private Sub Form_Load()
Left = 0
Top = 0
Me.Height = main.ScaleHeight
Me.Width = main.ScaleWidth
Set rec = DataEnvironment1.Recordsets(1)
rec.AddNew(这句错误,实时错误3251,当前记录不支持更新。这可能是提供的程序的限制,也可能是选的的锁定类型的限制)
End Sub