Max Wanadoo
max.wanadoo at gmail.com
Sun Feb 8 06:54:54 CST 2009
Yes, that is what I meant.
I didn't have the ability to test it before but glad you had the
intelligence to read between the lines (of code). <vbg>.
Send over the next problem.
Take care
Max
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: 08 February 2009 11:53
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Combobox.oldvalue display text?
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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com