实时错误'3021',BOF或EOF中有一个是"真",或者当前的记录以被删除,所需的操作要求一个当前的记录
VB+ACCESS报错代码:PrivateSubForm_Load()init_adostrQuery="selectdistinctcustomer.datefromc...
VB+ACCESS报错 代码:
Private Sub Form_Load()
init_ado
strQuery = "select distinct customer.date from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim i As Integer
For i = 1 To rsdata.RecordCount
Combodate.AddItem rsdata!Date
rsdata.MoveNext
Next i
rsdata.Close
strQuery = "select distinct customer.line from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim j As Integer
For j = 1 To rsdata.RecordCount
Comboline.AddItem rsdata!Line
rsdata.MoveNext
Next j
rsdata.Close
strQuery = "select distinct customer.sno from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim k As Integer
For k = 1 To rsdata.RecordCount
Comboseat.AddItem rsdata!sno
rsdata.MoveNext
Next k
rsdata.Close
End Sub 展开
Private Sub Form_Load()
init_ado
strQuery = "select distinct customer.date from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim i As Integer
For i = 1 To rsdata.RecordCount
Combodate.AddItem rsdata!Date
rsdata.MoveNext
Next i
rsdata.Close
strQuery = "select distinct customer.line from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim j As Integer
For j = 1 To rsdata.RecordCount
Comboline.AddItem rsdata!Line
rsdata.MoveNext
Next j
rsdata.Close
strQuery = "select distinct customer.sno from customer"
rsdata.Open strQuery, cnnrsdata, , , adCmdText
rsdata.MoveFirst
Dim k As Integer
For k = 1 To rsdata.RecordCount
Comboseat.AddItem rsdata!sno
rsdata.MoveNext
Next k
rsdata.Close
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询