TIP: Click on subject to list as thread! ANSI
echo: win_access
to: CINDY CHEEK
from: MIKE HENDRIX
date: 1996-12-16 22:21:00
subject: Create/Edit

Cindy Cheek wrote in a message to Mike Hendrix:
 CC> Hello Mike!
 MH> For the edit date create a field called say "DateLastChanged" then in
 MH> the BeforeUpdate function of the form enter this:
 MH>   [DateLastChanged] = Date
 CC> Huh?  Beg your pardon?  I'm not sure I follow.  Does this mean I
 CC> have to write a macro to reflect an event change?  If so, I'm not
 CC> sure I know how to do this since there's not a macro option of this
 CC> nature to choose from.  Gosh, I think need a refresher ACCESS
 CC> class...ugh
It's not a macro it's code.  Open up your form, select the code button on the 
toolbar, change the object to form, then select BeforeUpdate in the Proc: 
selection.  This is the function for BeforeUpdate.  It should look like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
    [DateLastChanged] = Date
End Sub
When you edit the record reflected in this form the [DateLastChange] will 
update to todays date before the record is saved.  If no changes are made the 
date will stay as previous.
 
Regards,
           Mike...
Fidonet:  1:147/114
Internet: hendrixm@msn.com
--- FMail/Win32 1.22
---------------
* Origin: -==- OKCity Ok (1:147/114)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.