Re: NotInList event of a ComboBox
- From: "David C. Holley" <DavidCHolley@xxxxxxxxxxxx>
- Date: Mon, 08 Aug 2005 13:55:21 -0400
Well, I kind of got it working using by counting the number of times the notInList event fires. Big ugly though...
David C. Holley wrote:
Of course it'd be TO easy for MS to have a .Transform method available! thpppt!
Marshall Barton wrote:
David C. Holley wrote:
Doesn't work. I tried explicity setting newData to a value that already exists in the list. Access ignores the value that I explicity set newData to and searches for the original value. Basically, I need to get Access to ignore the original value and select another.
David, this is a very tricky thing to do. Any time you save a value to the combo box's table that is different from the value the user entered, you run into this issue.
I don't remember the exact details, but it involves your NotInList procedure setting the combo box's Text property. This in turn will trigger another NotInList event so the event procedure will be processing two different values simultaneously. You need to use a Static flag variable so the procedure can determine what to do for the different values.
I don't have the time to search google for a code sample now, but maybe you can find one before I can get to it.
.
- References:
- NotInList event of a ComboBox
- From: David C. Holley
- Re: NotInList event of a ComboBox
- From: tina
- Re: NotInList event of a ComboBox
- From: David C. Holley
- Re: NotInList event of a ComboBox
- From: Marshall Barton
- Re: NotInList event of a ComboBox
- From: David C. Holley
- NotInList event of a ComboBox
- Prev by Date: Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- Next by Date: Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- Previous by thread: Re: NotInList event of a ComboBox
- Next by thread: Re: NotInList event of a ComboBox
- Index(es):
Relevant Pages
|