S
sparkane
I have a user who would like the position in a combo box to be
remembered between times when the user access the form holding the combo
box. So: user opens form A, enters value B into box. Later, user opens
form A, and value B appears in box automatically.
Normally this would be a simple procedure of setting the box to whatever
value was in the combo box previously. Ah, but there's a curve ball.
The row source for the combo box is a union query, which gets the same
list of Account IDs with last name first, first name first, and Account
ID first. This is to allow the user to select the account based on
different pieces of information. So the same _value_ appears in the
list multiple times, and using the _value_ to find what the user entered
previously doesn't really work, because the user wants to be at the
exact place in the list that she typed in before.
So, I've tried saving the string the user types in, and inserting it
into the combo box using the Text property. Unfortunately, this
automatically calls the AfterUpdate sub of the combo box. I won't go
into detail, but this can't happen.
I've tried inserting the saved string short one letter; however, this
raises an error that the item isn't in the list.
Can anyone tell me of a way to insert text into the combo box so that it
doesn't trigger an event; or some other way to go about doing this?
Thanks in advance.
remembered between times when the user access the form holding the combo
box. So: user opens form A, enters value B into box. Later, user opens
form A, and value B appears in box automatically.
Normally this would be a simple procedure of setting the box to whatever
value was in the combo box previously. Ah, but there's a curve ball.
The row source for the combo box is a union query, which gets the same
list of Account IDs with last name first, first name first, and Account
ID first. This is to allow the user to select the account based on
different pieces of information. So the same _value_ appears in the
list multiple times, and using the _value_ to find what the user entered
previously doesn't really work, because the user wants to be at the
exact place in the list that she typed in before.
So, I've tried saving the string the user types in, and inserting it
into the combo box using the Text property. Unfortunately, this
automatically calls the AfterUpdate sub of the combo box. I won't go
into detail, but this can't happen.
I've tried inserting the saved string short one letter; however, this
raises an error that the item isn't in the list.
Can anyone tell me of a way to insert text into the combo box so that it
doesn't trigger an event; or some other way to go about doing this?
Thanks in advance.