cubemonkey
Member
- Joined
- Sep 19, 2005
- Messages
- 6
- Programming Experience
- Beginner
I have a textbox that I enter an integer into and I want the Position in the database to display that record. It works fine when i use next and prev buttons to go though one at a time but not when I specify the exact record I want to view. Can I not set the .Position to a specific integer?
Dim bmSystem As BindingManagerBase
bmSystem = Me.BindingContext(Dswhatever1, "whatever")
txtWeaknessnum.DataBindings.Add(New System.Windows.Forms.Binding("Text", Dswhatever1, "whatever.Key"))
Dim intnum As Integer
intnum = (CInt(txtWeaknessnum.Text))
Try
If Not (intnum < 0 And intnum >= bmSystem.Count - 1) Then
bmSystem.Position = intnum ***fails here*****
End If
Catch ex As Exception
Dim bmSystem As BindingManagerBase
bmSystem = Me.BindingContext(Dswhatever1, "whatever")
txtWeaknessnum.DataBindings.Add(New System.Windows.Forms.Binding("Text", Dswhatever1, "whatever.Key"))
Dim intnum As Integer
intnum = (CInt(txtWeaknessnum.Text))
Try
If Not (intnum < 0 And intnum >= bmSystem.Count - 1) Then
bmSystem.Position = intnum ***fails here*****
End If
Catch ex As Exception