Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture the values of before and after change? 1

Status
Not open for further replies.

chrislx

Programmer
Oct 17, 2003
32
US
Please help me on the following:

The value shown in a field of a subform is bounded with a table column (not primary key). After the value is changed, for example, from "AAA" to "BBB", I need to give a warning message for the difference of the two strings. Which event should be used here to capture both the old and new values? I tried to use After Update, OnGotFocus Events and got either the old or the new value, but not both.

Thanks in advance,

 
Hi!

You can use the .OldValue property of the control to get the value it had before changing, and .Value property for the current.

[tt]if me!txtTest.OldValue<>me!txtTest.Value Then
...[/tt]

Perhaps also take a look at the before update event?

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top