Can anybody help me with the code below. I'm expecting the query to return at leat 100 records, it displayed the first record but when I click on the next button, it just doesn't do anything. And the previous button generates a run-time error of "3219" - The operation requested by the application is not allowed in this context.
Any help will be greatly appreciated
Public cn As ADODB.Connection
public adors As ADODB.Recordset
Private sub qryCase()
Set cn = New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.3.51"
cn.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\cases.mdb"
cn.OpenSet adors = cn.Execute(strCriteria)
txtCase.text = adors!case_no
txtOwning.text = adors!owning_area
txtRLoc.text = adors!area_no
...some more codes...
end sub
private sub cmdNext_click
if not adors.eof
adors.movenext
end if
Private Sub cmdPrevious_Click()
If Not adors.BOF Then
adors.MovePrevious
End If
End Sub
Any help will be greatly appreciated
Public cn As ADODB.Connection
public adors As ADODB.Recordset
Private sub qryCase()
Set cn = New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.3.51"
cn.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\cases.mdb"
cn.OpenSet adors = cn.Execute(strCriteria)
txtCase.text = adors!case_no
txtOwning.text = adors!owning_area
txtRLoc.text = adors!area_no
...some more codes...
end sub
private sub cmdNext_click
if not adors.eof
adors.movenext
end if
Private Sub cmdPrevious_Click()
If Not adors.BOF Then
adors.MovePrevious
End If
End Sub