-===> Quoting Cindy Cheek to Jim Chevraux <=-
CC> Huh? Beg your pardon? I'm not sure I follow. Does this mean I have
CC> to write a macro to reflect an event change? If so, I'm not sure I
Not a macro, Access Basic code.
CC> know how to do this since there's not a macro option of this nature to
CC> choose from. Gosh, I think need a refresher ACCESS class...ugh
Bring up the form in design view. Then click on one of the text
boxes
that you want to monitor for changes (say, a PaidOn text box for a field of
the same name). Click with your right mouse button and open up the
properties
box.
Scroll down through that box and you'll find an event called "On
Change" that you can define a set of instructions that'll occur when that
event happens in that text box. Click to the right of the text box for the
On
Change event and a box with a "..." in it will appear. If a dialog box
hasn't
come up, click on that box and it will. Select "Code Builder" out of the
three options.
At that time, a box will open up that contains the following:
Private Sub ???_Change() ??? = the name of the text
ox
PaidOn in my example
End Sub
At this time, there's no code in there. Inbetween the two lines,
type
in Modified=Date. The result will look like the code down below from my last
message.
Now anytime the contents of the PaidOn field is changed, Access will
put the current system date into the [Modified] field for that record.
You can repeat this with any other fields that you wish to update the
[Modified] field when changed. To do this the easiest, mark and copy the
"Modified=Date" line, and after opening each On Change properties box,
position your cursor and paste it into the event for that box.
JC> Anyways, what you could do is add a routine into the On Change
JC> property for each field that can be edited that simply replaces that
JC> field with the current date. For example, if you had a [PaidOn] field
JC> and the field you wanted to contain the last modified date was called
JC> [Modified] , the On Change property for the [PaidOn] text box would
JC> look like this:
JC> Private Sub PaidOn_Change()
JC> Modified = Date
JC> End Sub
jc
... Prodigy: The comic book of online services.
--- FLAME v1.1
---------------
* Origin: CanCom TBBS - Canton, OH (1:157/629)
|