[RESOLVED] Need help with ADODB
As I have already stated that I need help with some simple problem I think? So what I have access file db and it reads and writes to it fine but when I want to go thought records with a Next Button I only move from first to second record and then it stops the code that I have is bellow and if you know what I am doing wrong please help.
.bas File
Quote:
Public ac As New ADODB.Connection Public ar As New ADODB.Recordset Public CurrentForm As Form Public strConek, pword, CurrentUser As String Public rc, ctr, passFlag, liCtr, dbFlag, menuFlag, saveFlag As Integer Public Function dblink() Set ac = New ADODB.Connection Set ar = New ADODB.Recordset strConek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Data\Imenik.mdb;Persist " & _ "Security Info=False;Jet OLEDB:Database Password=cc03bn01" End Function
Thanks!
Next Button
Quote:
Private Sub cmdNext_Click() On Error GoTo Error_Handler Call dblink ar.Open "Select * From Data", strConek, adOpenStatic, adLockOptimistic If ar.EOF = False Then ar.MoveNext Call PopulateControls End If ar.Close Error_Handler: Select Case Err.Number Case 3021 MsgBox "Kraj Imenika End", , MSGTITLE End Select End Sub