My apologies -- just realised I was applying the logic to the field and not the 
combobox itsel. Now I've fixed that the oldvalue works perfectly - many thanks

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, 
Tom
Sent: 22 August 2006 13:53
To: [email protected]
Subject: RE: [ms_access] Comparing Combo Box before & after change

 

Thanks

But the .OldValue extension causes a compile error "Method or data member not 
found" - do I need to include any references or add-ins for this to work?

________________________________

From: [email protected] <mailto:ms_access%40yahoogroups.com>  
[mailto:[email protected] <mailto:ms_access%40yahoogroups.com> ] On 
Behalf Of L Tumbulu
Sent: 22 August 2006 12:58
To: [email protected] <mailto:ms_access%40yahoogroups.com> 
Subject: RE: [ms_access] Comparing Combo Box before & after change

After the combobox is updated you can access the old value by
If Me.Status.OldValue = "Broken" And Me.Status = "Working" Then ...

HTH

Liveson

_____ 

From: [email protected] <mailto:ms_access%40yahoogroups.com>  
<mailto:ms_access%40yahoogroups.com> [mailto:[email protected] 
<mailto:ms_access%40yahoogroups.com>  <mailto:ms_access%40yahoogroups.com> ] On 
Behalf
Of tombrown1965
Sent: Tuesday, 22 August, 2006 12:50 PM
To: [email protected] <mailto:ms_access%40yahoogroups.com>  
<mailto:ms_access%40yahoogroups.com> 
Subject: [ms_access] Comparing Combo Box before & after change

I have a form which includes a combobox field (Status) with about 5 
different options. I also have a number of timestamp fields that I 
want to update based on when the field in the combo box changes.

This is easy if the update is just based on what i change the combo 
field to, as I add this to the BeforeUpdate event

If Me!Status = "Working" Then
Me!Change1TimeStamp = Now
etc.

But I want the update to be based on what the field changes from & 
to, so I want soemthing like

If Me!Status(original) = "Broken" AND Me!Status(newvalue) = "Working" 
Then
Me!Change1TimeStamp = Now
etc.

But i cant see how I can access the pre-change value .. can anyone 
help

PS - I would prefer not to have to use unbound fields as it means 
more rework :)

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

 



[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to