Join 136,188 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,131 people online right now. Registration is fast and FREE... Join Now!
Checking for BOF and EOF doesnt require a FlexGrid, you do that with your RecordSet Object, like
CODE
'Check for EOF (End Of File) If Not MyRecordSet.EOF Then 'Do something because theres 'more records available Else 'We're at the end of the records Else
'Check for BOF (Beginning of File) If Not MyRecordSet.EOF Then 'MoveFirst will move the pointer 'to the first record in the recordset MyRecordSet.MoveFirst End If
Checking for BOF and EOF doesnt require a FlexGrid, you do that with your RecordSet Object, like
CODE
'Check for EOF (End Of File) If Not MyRecordSet.EOF Then 'Do something because theres 'more records available Else 'We're at the end of the records Else
'Check for BOF (Beginning of File) If Not MyRecordSet.EOF Then 'MoveFirst will move the pointer 'to the first record in the recordset MyRecordSet.MoveFirst End If
Private Sub Form_Load() 'the format string just lets you define a format for how 'your flexgrid will appear MSFlexGrid1.FormatString = "Artist Name |" & _ "Album Name | Tracks"
'make sure the search path to the db is always in the right spot Data1.DatabaseName = App.Path & "\CDCollection.mdb" 'set up the recordsource for the datasource and flexgrid control 'in this case, it's just a raw SQL query, simple simple. Data1.RecordSource = "select * from CDs order by ArtistName"
End Sub
I got this off a site some years ago and am trying to play with it now.