akohan
asked on
problem with event
Hello group,
I'm using event of a Combbox (drop-down menu) to manage some operations:
1) ListIndex = 0 Nothing and its text is Blank
2) ListIndex = 1 and its text is "Create a new report"
From ListIndex > 1 all existing records are started meaning that when user selects one of them all associated data/parameters are retreived and shown in
their edit boxes.
Problem:
Assume user selects index = 2 and then he changes report name and then switches or chooses
a different report, by selecing index = 3 or any; since there has been modification applied so program
shows confirmation to save or not to save the changes.
Problem is that I need to referesh the drop-down menu to show the updated report name however, since I'm doing all these on Click() event of the drop-down
menu it loses the next index it was going to switch.
Of course I can save it in a variable and assign it back like :
comb1.listindex = stored_index
but this will cause the confirmation to show up twice.
What can I do?
Regards,
ak
I'm using event of a Combbox (drop-down menu) to manage some operations:
1) ListIndex = 0 Nothing and its text is Blank
2) ListIndex = 1 and its text is "Create a new report"
From ListIndex > 1 all existing records are started meaning that when user selects one of them all associated data/parameters are retreived and shown in
their edit boxes.
Problem:
Assume user selects index = 2 and then he changes report name and then switches or chooses
a different report, by selecing index = 3 or any; since there has been modification applied so program
shows confirmation to save or not to save the changes.
Problem is that I need to referesh the drop-down menu to show the updated report name however, since I'm doing all these on Click() event of the drop-down
menu it loses the next index it was going to switch.
Of course I can save it in a variable and assign it back like :
comb1.listindex = stored_index
but this will cause the confirmation to show up twice.
What can I do?
Regards,
ak
ASKER
Hi,
You mentioned using
comb1.list(comb1.listindex
How can I make the system ignore its event by using above statement?
Regards,
ak
changing the text does not trigger the OnClick event?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks indeed.
Regards,
ak
you can try comb1.list(comb1.listindex
if that dont work, you can consider deleting a certain row, and inserting a new one at that location. I thin combobox has .remove and .additem functions? (It should be the same as a list box)