Project Detail

Sort ListBox BUT index drives other functions, so must sync  

Sort ListBox BUT index drives other functions, so must sync is project number 543382
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: Markkalender

Budget: $30-250

Created: 11/04/2009 at 14:58 EST

Bid Count: 7

Average Bid:
$ 41

11/05/2009 at 14:58 EST

Project Creator: MyGreyGoose
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (2 reviews)

Bid On This Project
 

Description

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 listbox.sorted 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 ..."


Additional files submitted:
frmDeal.frm

Messages Posted:2 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

60

1 day

11-04-2009 15:34 EST

I know how to sort your list-box while making sure other functions still work off the correct index by ..Simply looking at code with no easy reference points is very hard. although the code in general looks very simply. i think whats happening is that the list id is corresponding to the row id from your database. This means changing the ids is not an option. since these ids should never change. 2 things i can think of. we can add a sort id into the database that will keep track of how things get sorted. Or the easiest solution i can think of is to change some of the code and how things are referenced. for example looking at the code i can see that " .ItemData(.NewIndex) = rs("DealerID")" the dealerId for example is the indexId of the list. so when a change happens. the code relys on the index of the list to be the same as the index in the database. i would only need max 2 hours to work on this 60$. i will however need the actual project to make the changes or find what needs to be changed easly in 2 hours. I can do the work directly in the original with you keeping a backup, or i can document what changes i am doing so you can do theme yourself.look forward to your reply. hope to start and finish today.

help

 

50

1 day

11-04-2009 15:50 EST

Hello - Please see PMB for details of my bid. Thank you. Chandra Ram.

help

 

30

0 days

11-04-2009 20:16 EST

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.

help

 

30

3 days

11-04-2009 16:31 EST

"I know how to sort your listbox while making sure other functions still work off the correct index by ...", Hello, I am Visual Basic 6 programmer. For more details about your requirements please see your private PM. Thanks.

help

 

50

2 days

11-04-2009 16:33 EST

(No Feedback Yet)

Please see PMB

help

 

40

1 day

11-04-2009 19:19 EST

(No Feedback Yet)

Hi Friend Please see PM Thanks

help

 

30

1 day

11-04-2009 20:16 EST

(No Feedback Yet)

I know how to sort your listbox while making sure other functions still work off the correct index by... I can fix this. Thanks, John

help


    Bid on this Project