0 Replies - 489 Views - Last Post: 14 October 2013 - 09:20 PM Rate Topic: -----

#1 vishal anand  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 28-August 13

getting runtime error 3021 in vb6 using flat scrollbar with recordset

Posted 14 October 2013 - 09:20 PM

hi my name is vishal. i have some what done the code for flat scroll bar with recordset data while scrolling of datas entered previously.
i had a problem recently while scrolling for datas entered so far to see them i encountered error runtime 3021 which displays message that my previous entered data has been deleted. i have been trying to fix the error with little success.
i have done some coding but still not being able to fix the error.Can anyone help me please!
Private Sub Form_Load()
Dim x As Integer
cboVirology.AddItem "Positive"
cboVirology.AddItem "Neutral"
Set rstt = New ADODB.Recordset
rstt.Open "Reprocess", adoDatabase, adOpenKeyset, adLockOptimistic, adCmdTable
FlatScrollBar2.Max = rstt.RecordCount
End Sub


Private Sub FlatScrollBar2_Change()
rstt.MoveFirst
rstt.Move FlatScrollBar2.Value

txtMName.Text = rstt("ManufacturerName").Value
txtMName.Enabled = False
txtMSno.Text = rstt("MFR_SL_NO").Value
txtMSno.Enabled = False
cboVirology.Text = rstt("volume").Value
cboVirology.Enabled = False
Do Until rstt.EOF
If rstt.EOF = True Then
rstt.MoveLast
End If
rstt.MoveNext
Loop
End Sub




Is This A Good Question/Topic? 0
  • +

Page 1 of 1