[AccessD] Combobox.oldvalue display text?

Stuart McLachlan stuart at lexacorp.com.pg
Sun Feb 8 05:53:15 CST 2009


Hi Max,

Won't work,

clt.Value, ctl.Oldvalue and ctl.Column(x) are properties of a control,
there is no such property as clt.Value.Column(x) or ctl.Oldvalue.Column(x)

However, you've just given me an idea.
I can use ctl.Column(0) to get the new value I want, so that's halved the number of lookups I 
have to do.

So now it's just:
    Case "cbo"
      If Nz(ctl.Value, "") <> Nz(ctl.OldValue, "") Then
          strchanges = strchanges + Mid$(ctl.Name, 4, Len(ctl.Name) - 5) _
               & " changed from '" & GetValue(ctl.Rowsource, Nz(ctl.OldValue, 0)) _
               & "'-to-'" & Nz(ctl.Column(0), "BLANK") & "'" & vbCrLf
       End If

Cheers,
Stuart

On 8 Feb 2009 at 10:43, Max Wanadoo wrote:

>     Case "cbo" ' value will be a long but we want the description
>         If ctl.Value <> ctl.OldValue Then
>           strchanges = strchanges + Mid$(ctl.Name, 4) & " changed from '" &
> ctl.OldValue.column(0)  & "'-to-'" & ctl.Value.column(0) & "'" & vbCrLf
>        End If




More information about the AccessD mailing list