S
Stef
Hello all,
I have a problem, I want to use the beforeupdate event of a combobox to
cancel
an action (using a simple msgbox warning in the event), but it doesn't seem
to work.
I even made the event routine dead simple: cancel all the time. And no
success... !!!
It seems to work a bit has the AfterUpdate event never trigger when I cancel
and
does trigger and I don't, but the value stay the same even when I cancel.
The combobox is unbound but takes it values from a query.
Help!!
Here's my dead-simple-but-doesn't-work routine:
Private Sub cboManufacturer_BeforeUpdate(Cancel As Integer)
MsgBox (Me.cboManufacturer.Value & "<vs>" &
Me.cboManufacturer.OldValue)
Me.cboManufacturer.Undo
Cancel = True
End Sub
Note: The msgbox was to show me .oldvalue & .value, and there always the
same
even if I just changed the value. Maybe it doesn't work for
unbound combobox
Thx
Stef
I have a problem, I want to use the beforeupdate event of a combobox to
cancel
an action (using a simple msgbox warning in the event), but it doesn't seem
to work.
I even made the event routine dead simple: cancel all the time. And no
success... !!!
It seems to work a bit has the AfterUpdate event never trigger when I cancel
and
does trigger and I don't, but the value stay the same even when I cancel.
The combobox is unbound but takes it values from a query.
Help!!
Here's my dead-simple-but-doesn't-work routine:
Private Sub cboManufacturer_BeforeUpdate(Cancel As Integer)
MsgBox (Me.cboManufacturer.Value & "<vs>" &
Me.cboManufacturer.OldValue)
Me.cboManufacturer.Undo
Cancel = True
End Sub
Note: The msgbox was to show me .oldvalue & .value, and there always the
same
even if I just changed the value. Maybe it doesn't work for
unbound combobox
Thx
Stef