Here’s a shema of the target design:
The image reflect how the project works (the part where the question arise).
When the application is fired, a “Welcome” window is displayed and I store some data extracted from the data base (Number of people in the db, In and Out; last access date).
A click or key press close this window and display the View by list window for user reading.
When the user want to watch the full Record, he double click in an entry from the ListBox (in the View by List window),
The View by Record window is displayed. In its Open Event, the Unique ID of the selected record (stored in the ListBox RowTag) is used to display the whole Record in the window so the user can read each lines from the Cells where more than one line exist (just like the Comments fields in the shared image.
The user can Add, Remove and Modify a Record in the View by Record window.
I think, it is easier for the user to be able to navigate through the data base when in that mode.
But, excepted for MoveToFirst and MoveToLast (already implemented), I have no command to go to the next Record because there is no Position like in BinaryStream, and I do not have a RecordSet to navigate from the currently displayed Record (the RecordSet holds only one Record…).
What I started to think (either by my own or because of one answer here, I may:
Read for a Record by its Unique ID in a Loop:
a. So, Add 1 to the current UniqueID,
b. Ask for that Record,
c. Loop if the RecordSet is Nil (or empty or…) and go back to dot & above)
Once a Record is read or the Last Record reached, display it.
Same (except remove 1 to the current UniqueID and loop back)…
Are-you OK with that or did you have a better or an alternate design to achieve that goal ?
PS: in the image, I set two colors (background) to mimic a different window; there was no need to set a background color for the ListBox…