Recording the date the date within a text box is changed.

  • Thread starter Thread starter sleeperjjb
  • Start date Start date
S

sleeperjjb

I would like to record the date the date within a text box in a form is
changed. Is there a macro to do this? Would you include this macro on the On
Change property of the text box?
Any help would be appreciated.
 
Hi,

The first date's After Update event would be a better location. Then
it is only done when all the changing is completed and the user leaves the
control. In the macro simply set the second date's value to Date(), or Now()
if you want both the date and time.

Clifford Bass
 
Clifford Bass said:
Hi,

The first date's After Update event would be a better location. Then
it is only done when all the changing is completed and the user leaves the
control. In the macro simply set the second date's value to Date(), or Now()
if you want both the date and time.

Clifford Bass


Thank you for the response,
I think my horrible grammar screwed up my question however. so i'll try to
explain in a little more detail. I have a text box which has the email
address for a company listed. If one of my database users changes or erases
that email address, i would like to know if there is a way to record the date
that it was changed. It would record the date that only that text box was
changed and not the date that the form was changed.
I am also an amateur in access so the more you dumb down your response the
better.

thank you again,
 
Hi,

No problem. What I wrote still applies. When I say to use the After
Update event, I mean the After Update event of the control--your e-mail text
box--not the After Update event of the form.

To create a macro or an event procedure to do this right-click on the
e-mail address text box and choose Properties. Click on the "Event" tab.
Click in the "After Update" line. You will see a button with three periods
on it. Click it. When prompted choose either Macro Builder or Code Builder.

If you chose to do a macro, you would use the SetValue action. For the
Item you would specify your e-mail address changed date text box. For the
Expression you would specify Date() or Now().

If you chose to do code (an Event procedure) you would simply add the
following to the automaticly generated subroutine skeleton (using your email
address date changed text box):

[txtEmail_Address_Changed_Date] = Date
or
[txtEmail_Address_Changed_Date] = Now

Note that the parentheses are not needed after Date or Now in this
code; and if you type them Access will actually remove them. That should do
it.

Clifford Bass
 
Back
Top