RosettaStone
IS-IT--Management
On a regular form (not continuous) I want to have little buttons (don't care where they are placed) that I can press to jump to the first record where a selected field starts with that button's text -- and then be able to have "next record" and "previous record" form controls work intuitively.
First approximation to the ideal solution would have static text on the buttons... e.g., "A" "B" "E" "K" "L". Pressing the "K" button would cause the form to display the first record with that starts with "K" -- e.g., K0001, and then pressing the "Next" button on the form would cause the form to display record K0002, then K0003, etc.
The function/code/whatever can't assume that the recordset is sorted on the target control. It's OK to force a sort on the target, however -- there's no context to lose.
The next approximation to the ideal solution would have 20 buttons, with text that varies depending on the distribution of data in the underlying table. There would be some sort of "recalculate" button on the form (or elsewhere) to re-determine the button text values. I assume that these values would be stored in a table somewhere to give persistence between invocations of the form.
The underlying problem is the need to scan through a relatively large database that's indexed on email addresses. I want to be able to quickly determine if a particular record is present or not, without having to type in the email address somewhere. In addition, the problem is compounded by the need to access the same table (form) using two other index values -- a serial number and a product code, both of which are 17-digit random values.
In the final solution, I envision 3 rows of buttons, one for email, one for serial number, and one row for product code (total of 60 buttons). Pressing the appropriate button would first sort the recordset, then jump to the appropriate record.
Finally, I should note I'm still using Access 97. Also, I realize that there's probably a more elegant way to do this than using 60 buttons.... I'm open to ideas. Thanks in advance.
First approximation to the ideal solution would have static text on the buttons... e.g., "A" "B" "E" "K" "L". Pressing the "K" button would cause the form to display the first record with that starts with "K" -- e.g., K0001, and then pressing the "Next" button on the form would cause the form to display record K0002, then K0003, etc.
The function/code/whatever can't assume that the recordset is sorted on the target control. It's OK to force a sort on the target, however -- there's no context to lose.
The next approximation to the ideal solution would have 20 buttons, with text that varies depending on the distribution of data in the underlying table. There would be some sort of "recalculate" button on the form (or elsewhere) to re-determine the button text values. I assume that these values would be stored in a table somewhere to give persistence between invocations of the form.
The underlying problem is the need to scan through a relatively large database that's indexed on email addresses. I want to be able to quickly determine if a particular record is present or not, without having to type in the email address somewhere. In addition, the problem is compounded by the need to access the same table (form) using two other index values -- a serial number and a product code, both of which are 17-digit random values.
In the final solution, I envision 3 rows of buttons, one for email, one for serial number, and one row for product code (total of 60 buttons). Pressing the appropriate button would first sort the recordset, then jump to the appropriate record.
Finally, I should note I'm still using Access 97. Also, I realize that there's probably a more elegant way to do this than using 60 buttons.... I'm open to ideas. Thanks in advance.