Changing database row after user input.....
Posted: Sat Dec 13, 2014 8:00 pm
New and in need of advice and a push in the right direction.
I'll try to explain what I am attempting to do....
I have been trying many different ways to accomplish my goal but have not figured out how to make this work yet.
My database contains sport player information. Once the program is run the user inputs a players jersey number or their name into the string gadget and the fields are populated. This part works fine.
Once the fields are populated a user can enter another players name or number and it populates the new data without problems.
However I also have a "Next" and "Previous" button available for use once an initial look up has been populated. The issue I am having is that once the initial data is populated in the fields and the user then uses the "Next" or "Prev" button then program starts to populate the fields from the first entry RecNo 1 in the database table, and not from the current players number column.
I am trying to write the code to go to the next or previous players number value and not the RowID. Of course the players jersey numbers are as an example 1, 2, 6, 10, 15, 3, 18.... where they do not follow a strict sequential pattern. And I cannot use the RowID for increment or decrement because during a season there are deletions and additions of players during trades and acquisitions. So a player #6 maybe deleted from the current RowID and weeks later a new player with the same jersey number entered, but it will have a new RowID at the end of the table, and there is no way to move the player into the correct position in the table.
So I am looking for a way to write the procedure to get the value of the the jersey number, then increment or decrement to the next known value... which is not always an increment by the value of 1 as I mentioned.
Any help and hints would be helpful.
Thanks in advance.
I'll try to explain what I am attempting to do....
I have been trying many different ways to accomplish my goal but have not figured out how to make this work yet.
My database contains sport player information. Once the program is run the user inputs a players jersey number or their name into the string gadget and the fields are populated. This part works fine.
Once the fields are populated a user can enter another players name or number and it populates the new data without problems.
However I also have a "Next" and "Previous" button available for use once an initial look up has been populated. The issue I am having is that once the initial data is populated in the fields and the user then uses the "Next" or "Prev" button then program starts to populate the fields from the first entry RecNo 1 in the database table, and not from the current players number column.
I am trying to write the code to go to the next or previous players number value and not the RowID. Of course the players jersey numbers are as an example 1, 2, 6, 10, 15, 3, 18.... where they do not follow a strict sequential pattern. And I cannot use the RowID for increment or decrement because during a season there are deletions and additions of players during trades and acquisitions. So a player #6 maybe deleted from the current RowID and weeks later a new player with the same jersey number entered, but it will have a new RowID at the end of the table, and there is no way to move the player into the correct position in the table.
So I am looking for a way to write the procedure to get the value of the the jersey number, then increment or decrement to the next known value... which is not always an increment by the value of 1 as I mentioned.
Any help and hints would be helpful.
Thanks in advance.