# 我的 SOURCE CODE 错在那里

Posted by jeff on May 07, 1999 at 09:58:56:

我的 SOURCE CODE 错在那里

下列的SOURCE CODE 对吗?
尤其是 If trade("班级名称") = Text1 Then 这里可以这样使用吗?

Private Sub Form_Load()
Set dbs = OpenDatabase("c:\s\vbdb.mdb")
Set trade = dbs.OpenRecordset("select 班级资料.班级名称 from 班级资料")
trade.MoveFirst
Do Until trade.EOF
List1.AddItem trade(0)
trade.MoveNext
Loop
trade.Close

End Sub

Private Sub Command2_Click()

Text1.Text = List1.Text
List1.RemoveItem List1.ListIndex

For i = 0 To trade.RecordCount
If trade("班级名称") = Text1 Then
trade.Edit
trade("班级名称") = ""
trade.Update
trade.MoveNext
End If
Next
trade.Close
End Sub

Follow Ups:

- Re: 我的 SOURCE CODE 错在那里 纪文和 11:08:03 5/07/99 (0)