Click here to Skip to main content
15,887,821 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralDesktop Icons Pin
GRMartin3-Dec-04 1:46
GRMartin3-Dec-04 1:46 
GeneralRe: Desktop Icons Pin
MohammadAmiry4-Dec-04 2:53
MohammadAmiry4-Dec-04 2:53 
GeneralCrystal Report Pin
nitin_ion2-Dec-04 22:07
nitin_ion2-Dec-04 22:07 
GeneralRe: Crystal Report Pin
Tom John2-Dec-04 22:18
Tom John2-Dec-04 22:18 
GeneralVB6 - How to list network domains and/or users Pin
steff kamush2-Dec-04 21:11
steff kamush2-Dec-04 21:11 
GeneralRe: VB6 - How to list network domains and/or users Pin
jonathan152-Dec-04 23:09
jonathan152-Dec-04 23:09 
Generalaccess database question Pin
Member 14960382-Dec-04 14:41
Member 14960382-Dec-04 14:41 
GeneralRe: access database question Pin
doWhileSomething4-Dec-04 15:15
doWhileSomething4-Dec-04 15:15 
Define a Class level variable "

Dim CM as CurrencyManager

'Bind the CurrencyManager on form load.

>Load event (DsCustData1 = dataset, tblCustomer is the table the data set was populated by)

CM = Me.BindingContext(DsCustData1, "tblCustomer")

'End load event

Private Sub btnNextCust_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNextCust.Click
Try
'Next button
'Advance to the next row in the table
If CM.Position < (CM.Count - 1) Then
CM.Position += 1
Else
MessageBox.Show("No More Records.")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Catch CM As Exception
MessageBox.Show(CM.Message)
End Try
End Sub

Private Sub btnPreviosCust_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreviosCust.Click
Try
'Previous button
If CM.Position > 0 Then
CM.Position -= 1
Else
MessageBox.Show("You Are At The First Record.")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Catch CM As Exception
MessageBox.Show(CM.Message)
End Try
End Sub

The above would be two buttons to browse forward and back in your dataset.

The dataset has a count property that counts all rows obviously. With the currency manager has a "position" which is dictated by the count property of the dataset.

You should be able to grab what you need from that.
GeneralQuestion about sale Pin
safran662-Dec-04 12:58
safran662-Dec-04 12:58 
GeneralRe: Question about sale Pin
Purple Monk3-Dec-04 4:02
Purple Monk3-Dec-04 4:02 
GeneralRe: Question about sale Pin
safran663-Dec-04 18:54
safran663-Dec-04 18:54 
GeneralRe: Question about sale Pin
MohammadAmiry4-Dec-04 2:49
MohammadAmiry4-Dec-04 2:49 
GeneralFree reporting tool Pin
Mekong River2-Dec-04 10:04
Mekong River2-Dec-04 10:04 
GeneralRe: Free reporting tool Pin
safran662-Dec-04 12:44
safran662-Dec-04 12:44 
Generalserialization of datagridtablestyle Pin
frush1232-Dec-04 8:18
frush1232-Dec-04 8:18 
GeneralRe: serialization of datagridtablestyle Pin
Tom John3-Dec-04 2:03
Tom John3-Dec-04 2:03 
GeneralRe: serialization of datagridtablestyle Pin
frush1233-Dec-04 2:07
frush1233-Dec-04 2:07 
GeneralRe: serialization of datagridtablestyle Pin
Tom John3-Dec-04 2:41
Tom John3-Dec-04 2:41 
GeneralRe: serialization of datagridtablestyle Pin
frush1233-Dec-04 2:59
frush1233-Dec-04 2:59 
GeneralRe: serialization of datagridtablestyle Pin
Tom John3-Dec-04 3:14
Tom John3-Dec-04 3:14 
GeneralRe: serialization of datagridtablestyle Pin
Anonymous3-Dec-04 12:21
Anonymous3-Dec-04 12:21 
GeneralProblems with code Pin
Tech 4 a dummy2-Dec-04 4:28
Tech 4 a dummy2-Dec-04 4:28 
GeneralRe: Problems with code Pin
The Man from U.N.C.L.E.2-Dec-04 5:28
The Man from U.N.C.L.E.2-Dec-04 5:28 
GeneralRe: Windows Services CPU Usage Problem Pin
Dave Kreskowiak2-Dec-04 1:23
mveDave Kreskowiak2-Dec-04 1:23 
GeneralRe: Windows Services CPU Usage Problem Pin
sayhigh2-Dec-04 14:43
sayhigh2-Dec-04 14:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.