TIP: Click on subject to list as thread! ANSI
echo: win_access
to: JIM CHEVRAUX
from: CINDY CHEEK
date: 1996-12-29 16:02:00
subject: EDIT/CREATE

Hello Jim!
Tuesday December 17 1996 11:44, Jim Chevraux wrote to Cindy Cheek:
 JC>         Bring up the form in design view.  Then click on one of the
 JC> text boxes that you want to monitor for changes (say, a PaidOn text
 JC> box for a field of the same name).  Click with your right mouse button
 JC> and open up the properties
 JC> box.
 JC>         Scroll down through that box and you'll find an event called
 JC> "On Change" that you can define a set of instructions that'll occur
 JC> when that event happens in that text box.  Click to the right of the
 JC> text box for the On Change event and a box with a "..." in it will
 JC> appear.  If a dialog box hasn't come up, click on that box and it
 JC> will.  Select "Code Builder" out of the three options.
 JC>         At that time, a box will open up that contains the following:
 JC>                 Private Sub ???_Change()        ??? = the name of the
 JC> text box
 JC>                                                       PaidOn in my
 JC> example
 JC>                 End Sub
 JC>         At this time, there's no code in there.  Inbetween the two
 JC> lines, type in Modified=Date.  The result will look like the code down
 JC> below from my last message.
When I did that I got a compile error, guess I'm just not getting this.
 JC>         Now anytime the contents of the PaidOn field is changed,
 JC> Access will put the current system date into the [Modified] field for
 JC> that record.
No, we're not there yet.
 JC>         You can repeat this with any other fields that you wish to
 JC> update the [Modified] field when changed.  To do this the easiest,
 JC> mark and copy the "Modified=Date" line, and after opening each On
 JC> Change properties box, position your cursor and paste it into the
 JC> event for that box.
 JC>> Anyways, what you could do is add a routine into the On
 JC>> Change  property for each field that can be edited that simply
 JC>> replaces that field with the current date.  For example, if you
 JC>> had a [PaidOn] field and the field you wanted to contain the last
 JC>> modified date was called [Modified] , the On Change property for
 JC>> the [PaidOn] text box would look like this:        Private Sub
 JC>> PaidOn_Change()          Modified = Date        End Sub
 JC> jc
Cindy
--- Hertzian Mail+
---------------
* Origin: Hertzian Intercept-San Diego 619-578-9247 (6pm-1pm) (1:202/731)

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™.