Worked a treat! Thanks Stuart. For the benefit of others, your line: m_OldValue = Me.ComboName.Column(2).Value should read m_OldValue = Me.ComboName.Column(2)
The '.value' should be omitted.
"Stuart McCall" wrote:
[Quoted Text] > "Proko" <Proko[ at ]discussions.microsoft.com> wrote in message > news:5F0A1915-275F-406A-A48C-3E61A2C4324C[ at ]microsoft.com... > >I use the before update event to find the old and new values of the bound > > column of my combo box with: > > cbo_mycombo.OldValue and cbo_mycombo.Value > > > > But, is it posible to find the old and new values of an unbound column in > > the combo box with something like cbo_mycombo.Column(2).Value. > > > > Any help would be greatly appreciated. > > There's no built-in method, but you can easily roll your own. Create a > module-level variable to hold the old value. Call it (say) m_OldValue. Then > in your combo's GotFocus event, store the current value: > > m_OldValue = Me.ComboName.Column(2).Value > > Then, in the combo's BeforeUpdate event, use the variable to compare against > the current value: > > If Me.ComboName.Column(2).Value <> mOldValue Then > MsgBox "They don't match!" > End If > > Just curious: why do you want to do this? > > >
|