Option Explicit Private mcn As ADODB.Connection Private mrs As ADODB.Recordset Private Sub cmdNext_Click() With mrs .MoveNext If .EOF Then .MoveLast End With Call FillFields End Sub Private Sub cmdPrevious_Click() With mrs .MovePrevious If .BOF Then .MoveFirst End With Call FillFields End Sub Private Sub cmdUpdate_Click() Dim intRecord As Integer mcn.Execute "Update Authors " & _ "Set Author = '" & Replace(Text2.Text, "'", "''") & "' " & _ ", LastModif = '" & Now & _ "' where au_id = " & Text1.Text & _ " And LastModif = #" & Label1.Caption & "#", intRecord If intRecord = 0 Then MsgBox "The record have been modified since it was read!!!" Call OpenRS End Sub Private Sub Form_Load() Set mcn = New ADODB.Connection With mcn .CursorLocation = adUseClient .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\BIBLIO2000.MDB;Persist Security Info=False" .Open End With Call OpenRS End Sub Private Sub FillFields() Text1.Text = mrs!Au_id Text2.Text = mrs!Author Label1.Caption = mrs!LastModif & "" End Sub Private Sub OpenRS() Set mrs = New ADODB.Recordset mrs.Open "select * from authors", mcn, adOpenStatic, adLockReadOnly Call FillFields End Sub