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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lastchange

Status
Not open for further replies.

paulvdwa

Programmer
Jan 25, 2006
11
0
0
BE
Hello all,

I have a table with the following fields:
name C
biography M
lastchange D

I'm using a form to view the name and the biography, every time I change something to the name or the biography, the lastchange field must be filled with date(), when I'm just looking to the name without changing the name and/or biography, lastchange may not be adapted.
How manage it?

regards

Paul
 

Paul,

Is the table buffered? If so, add this code immediately before the TABLEUPDATE():

Code:
* assuming the relevant table is in the 
* current work area
IF Name <> ODLVAL("Name") OR ;
  Biography <> OLDVAL("Biography")
 
    REPLACE LastChange WITH DATE()

ENDIF

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top