Results 1 to 3 of 3

Thread: [RESOLVED] Need help with ADODB

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    67

    Resolved [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
    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 OLEDBatabase Password=cc03bn01" End Function
    Thanks!

    Next Button
    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
    Last edited by BHCluster; Dec 8th, 2008 at 03:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width