Database and label problem
Previously, I asked if it was possible to make a Flexgrid control transparent. Since nobody answered (*sniff*), I decided to try something else.
I've created 8 Label controls below eachother (to form a grid), and I've attached this code when the Form loads:
Code:
Sub BuildList(ListIndex)
Dim n
For n = 0 To 7
DMain.Recordset.MoveFirst
DMain.Recordset.Move ListIndex + n
LblMenu(n).Caption = DMain.Recordset.Fields("LongTitle")
Next n
End Sub
The ListIndex var is a public long and I call the sub from the Form_Load event with "BuildList (0)". So far so good.
Then I made two scroll buttons, one Up and one Down. I've attached this code, when I click on the Down button:
Code:
BuildList (ListIndex + 1)
The first time I click the button, it works fine, every label is updated correctly (like they scroll upwards). But when i click again, nothing happens. So what's wrong here?
Secondly, how can I check if the last label (with index 7) is going to reach the EOF of the database and the first label (with index 0) the BOF of the database?
I hope you understand all of this!
Dave.