Quote Originally Posted by Nightwalker83 View Post
No, the ID would be the button ID whereas TrayPosition would hold the Record ID. The Record ID is going to be 1 less than the button index because the record set start at -1 where as the button index start at 0.
You have that backwards.
Id = the id of the record
TrayPosition = the index of the button that stores the details

In databases, Ids (primary key) should be unique auto generated values. The application should have nothing to do with the management of them. Ids become important when doing CRUD operations.

In simplest terms, the changes I made were to save the id (record id) in the tag property of the button when loading the tray. This way you always know which record to work on. The I added TrayPosition so you know where to place the seed in the tray when you loading the data.