Tom

With the basic references (VBA, Ms Access 11.0 Object Library, OLE Automation), 
"Me.Status.OldValue" should work if Status is a control on the form. 
Alternatively you can assign the old value to a Static variable before the 
combobox is updated and compare it to the new value after the combobox is 
updated.

HTH

Liveson





--------------------------------------------------------------------------------
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, 
Tom
Sent: Tuesday, 22 August, 2006 2:53 PM
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:[EMAIL PROTECTED] On Behalf Of L Tumbulu
Sent: 22 August 2006 12:58
To: [email protected]
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:[email protected] <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> 
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]



 
Messages in this topic (3) Reply (via web post) | Start a new topic 
Messages | Files | Photos | Links | Database | Polls | Calendar 
 
You are receiving Individual Emails Change Delivery Settings 
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe Recent Activity
  a..  11New Members
  b..  1New Links
Visit Your Group 
SPONSORED LINKS
  a.. Database marketing software 
  b.. Database management software 
  c.. Online database software 
  d.. Customer database software 
  e.. Act database software 
Yahoo! 360°
Start Sharing

Your place online

Blog & photos

Yahoo! Avatars
Create a Face

Show your style in

Messenger & more.

New web site?
Drive traffic now.

Get your business

on Yahoo! search.
. 


[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