Visual Basic 6, Underlying DB is Access 2003
I have a listbox that drives other functions on a dashboard. Users add trucks to a listbox, and then when the user clicks on the various other trucks in the listbox, other functions update to reflect the current truck's data in the dashboard. Currently, when a user adds a truck to the listbox, it gets added to the bottom of the listbox. I want that list box sorted (by 2 fields: Model, Configuration).
I tried changing the [url removed, login to view] property to true. That did sort the listbox. But now the other functions dependent on the listbox don't work. I believe this is probably due to the index. My functions for adding trucks to the listbox use the Configuration's ID as the index. Probably the other functions are referring to that as the index, whereas now that the ListBox is sorted, the indexes don't match up. I'M ONLY SPECULATING THIS IS THE CAUSE. I did not write this code, so I'm not sure how exactly the listbox adding and the other functions relate to each other. What I do know is that after making the listbox sort property true, the other data & functions don't work how they're supposed to.
I'm open to suggestions on how to fix this. The end goal is to sort the ListBox by Model, the Configuration and for all the other dependent functions to work off the currently selected Truck in the listbox at any given point. There are 2 points where the trucks get loaded into the listbox: when the user is just starting a new deal and adding trucks "live", and also when trucks get loaded from past deals stored in another table. The solution needs to make sure that it all works in both cases.
I am not a coder. I can only tweak other people's pre-existing code. So I'll need your help patching your code into my project. If you care to look at the code, the attached file has it. lstTruck is the listbox I'm referring to.
To avoid canned responses, please begin your bid response with "I know how to sort your listbox while making sure other functions still work off the correct index by ..."
7 freelancers are bidding on average $41 for this job
I know how to sort your listbox while making sure other functions still work off the correct index by .... I can do it for you. Please check my PMB. Thanks.