I have a VB6 application which uses MS Access as its backend.
Im familiar with Access and therefore how to place the record
navigation buttons for:
First Record
Next Record
Previous Record
Last Record
How would i code this in VB 6?
I tried the following code on the first button but it doesnt go to the
first record
Code:rsExecDet.MoveFirst Me.txtRecordCaption = "Record " & rsExecDet.AbsolutePosition & " of " & intRecordCount
Last edited by TcM; 01-24-2008 at 05:17 AM.
These are the codes i've done and so far it works well
Code:Private Sub cmdFirst_Click() Adodc1.Refresh If txtName.Text = "" Then 'Do nothing ElseIf Adodc1.Recordset.BOF = True Then 'Do nothing Else Adodc1.Recordset.MoveFirst End If End Sub Private Sub cmdLast_Click() Adodc1.Refresh If txtName.Text = "" Then 'Do nothing ElseIf Adodc1.Recordset.EOF = True Then 'Do nothing Else Adodc1.Recordset.MoveLast End If End Sub Private Sub cmdPrev_Click() If txtName.Text = "" Then 'Do nothing ElseIf Adodc1.Recordset.BOF = True Then 'Do nothing Else Adodc1.Recordset.MovePrevious End If End Sub Private Sub cmdNext_Click() If txtName.Text = "" Then 'Do nothing ElseIf Adodc1.Recordset.EOF = True Then 'Do nothing Else Adodc1.Recordset.MoveNext End If End Sub
Last edited by TcM; 01-24-2008 at 05:17 AM.
Please remember to use the code-tags, both of you. It makes the text more readable.
I added the Code Tags.
Anyways moonrise did you try mrbar code? did it work?
I +rep mrbar for his effort.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks