List boxes.... (1 Viewer)

raghuprabhu

Registered User.
Local time
Today, 03:07
Joined
Mar 24, 2008
Messages
154
Hi All,
I have a form with three list boxes. List1, lstPP1, lstPP2

When I double click an item in "List1" I want the item move to "lstPP1" . That I am able to do. For example item is "2012/21". With the same action how do I make the next item in "List1" ie "2012/22" to move to "lstPP2"?

How do I limit the one item to "lstPP1"

How do I limit the one item to "lstPP2"

How do I reset the "List1" and sort it if pay period selection needs to be changed?

Finally if the last item ie "2013/20" in the list is clicked, there should be an error message "You can not click this item!"

Thanks in advance.
Raghu Prabhu from Melbourne.
 

Attachments

  • ListBox.zip
    32.9 KB · Views: 65

Solo712

Registered User.
Local time
Today, 06:07
Joined
Oct 19, 2012
Messages
828
Hi All,
I have a form with three list boxes. List1, lstPP1, lstPP2

When I double click an item in "List1" I want the item move to "lstPP1" . That I am able to do. For example item is "2012/21". With the same action how do I make the next item in "List1" ie "2012/22" to move to "lstPP2"?

How do I limit the one item to "lstPP1"

How do I limit the one item to "lstPP2"

How do I reset the "List1" and sort it if pay period selection needs to be changed?

Finally if the last item ie "2013/20" in the list is clicked, there should be an error message "You can not click this item!"

Thanks in advance.
Raghu Prabhu from Melbourne.

This is kind of convoluted so I'll give you a generic approach. You probably don't need lstPP2. If you select from List1 then the PP2 is an indexnumber of List one higher (if exists) then the one selected for PP1. You need to check the ListIndex against ListCount to make sure the last item on the list was not selected as the PP2 selection would be out of bounds.

To reset List1, the lstPP1 and lstPP2 simply clear the latter two and requery List1. Why are you using lists for PP1 and PP2 if you only want one item in them ? I would use textboxes if I were you.

Best,
Jiri
 

Users who are viewing this thread

Top Bottom