"Vmusic" <akerezy@irisicom.netwrote in
news:1153699136.646620.76430@75g2000cwc.googlegrou ps.com:
Quote:
No, No, No..... what kind of .... is this programming
language
>
Look I have a combo box. It is populated from data that runs
from a query- and it is bound to a column in a table.
>
When the user changes or selects a different value than what
is initially displayed - the BeforeUpdate or AfterUpdate
method fires.
>
I want to prompt the user to confirm they REALLY want to
change their value - If they don't confirm - or say no, then I
want to change the value back to what it originally was. In
order to change the value back - I have to programattically
change the ListIndex or some stupid property in the combo box.
>
The advice given is still valid.
When the user enters the combobox, the OnEnter event fires. You
store the existing value of the combobox to a variable. When the
user has finished changing the data, the before update event
fires. Then you decide the user is a bigger fool than you, When
he answers in the affirmative, you change it back, using the
statement given in previous messages.
However, because you explained your problem a little better, you
can actually use the cancel feature of the combobox (also of
text and list boxes) before update event.
If the user answers "No I wass being stupid, and I don't want to
chage the data," in your messagebox, you put the statement
cancel = true ' stops the event
me.combobox.undo ' reverse all changes since the box received
focus.
Quote:
How do you use VBA to programmatically change which row in the
combo box is selected??
>
I do not want to set it to some arbitrary string value. I want
the actual row selected to be programmatically changed...
because it's bound to a value in a table - which itself is a
lookup.
>
There HAS TO be a way to programmatically change the selected
row in a combo box?
>
Sorry - it seems like a simple question/ task.. but I have yet
see a clear answer, maybe even with a VBA code example
>
PLEASE don't tell me that if I write the code in the
BeforeUpdate method, and Exit Sub if they say no, that the
change won't take place. It does....
>
Thanks!!!!!
Vmusic
>
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com