Hi All,
I'm using Access 2003
I know there are a lot of problems related to the ListIndex property of a Combobox but could not find a post related to this one.
I attached a small DB that reproduces the problem:
I have a form with 2 textbox, 1 combobox.
- On the AfterUpdate event of textbox1, I set the listIndex of the Combobox to 1. The listIndex is set but I get a 7777 error message.
- On the Exit event of textbox2, I set the listIndex of the Combobox to 2. This works fine.
Any idea why I get this 7777 error when the listIndex is used inside the AfterUpdate of another control ?
I also noticed setFocus problems ("Access cannot move the focus right now") when used inside the AfterUpdate of a control but this problem is too inconsistent to produce a testcase.
My bottom line is I need to select an entry of a combobox based on the first column which is not the bound column (code/value rows).
I would really prefer to avoid using the ListIndex, setFocus as the behaviour of this methods seem extremely unstable and I suspect I'll get a lot of weird problems when the application will be deployed.
How on earth can I do that ?
Cheers,
Jerome
I'm using Access 2003
I know there are a lot of problems related to the ListIndex property of a Combobox but could not find a post related to this one.
I attached a small DB that reproduces the problem:
I have a form with 2 textbox, 1 combobox.
- On the AfterUpdate event of textbox1, I set the listIndex of the Combobox to 1. The listIndex is set but I get a 7777 error message.
- On the Exit event of textbox2, I set the listIndex of the Combobox to 2. This works fine.
Any idea why I get this 7777 error when the listIndex is used inside the AfterUpdate of another control ?
I also noticed setFocus problems ("Access cannot move the focus right now") when used inside the AfterUpdate of a control but this problem is too inconsistent to produce a testcase.
My bottom line is I need to select an entry of a combobox based on the first column which is not the bound column (code/value rows).
I would really prefer to avoid using the ListIndex, setFocus as the behaviour of this methods seem extremely unstable and I suspect I'll get a lot of weird problems when the application will be deployed.
How on earth can I do that ?
Cheers,
Jerome