data 控件的问题
Dim inf Private Sub Command1_Click() Data1.Recordset.AddNew Data1.Recordset.Updata Data1.Recordset.MoveLast End Sub Private Sub Command2_Click() inf = MsgBox("确实要删除本记录?", vbOKCancel, "删除记录") If inf = vbOKCancel Then Data1.Recordset.Delete End If End Sub Private Sub Command3_Click() Data1.Recordset.MovePrevious If Data1.Recordset.BOF Then Data1.Recordset.MoveFirst End If End Sub Private Sub Command4_Click() Data1.Recordset.MoveNext If Data1.Recordset.EOF Then Data1.Recordset.MoveLast End If End Sub Private Sub Command5_Click() Data1.Recordset.MoveFirst End Sub Private Sub Command6_Click() Data1.Recordset.MoveLast End Sub Private Sub Command7_Click() inf = InputBox("请输入要查找的商品编号", "查找商品") Data1.Recordset.Seek "=", CDbl(inf) If Data1.Recordset.NoMatch Then MsgBox "没有这种商品" End If End Sub |