Some Text Box help..

w0nger

New member
Local time
Today, 08:46
Joined
Sep 11, 2008
Messages
8
In my current form I have two boxes that require data to be entered. One is the user's ID number and the other is the date. The date box is currently setup so that when a new record is created is automatically puts in today's date.

I would like to get it so that on modification of the current record(on_dirty) that the UserID box clears itself and the date automatically updates to the current date. How can I do that??
 
use the form's before update event

this is called immediately before the record is finally saved, so here you can add code to manage other bits. You probably no that you can also run validation checks here if necessary also, and cancel the save if you want to.

so assuming that you are happy to write the changes in this event's code pout

editedby = userid
editedon = date()


a lot of users manage a simple audit trail by storing

recordcreatedby
recordcreatedon
recordlasteditedby
recordlasteditedon

if you need a fuller history then it will get more involved
 
use the form's before update event

this is called immediately before the record is finally saved, so here you can add code to manage other bits. You probably no that you can also run validation checks here if necessary also, and cancel the save if you want to.

so assuming that you are happy to write the changes in this event's code pout

editedby = userid
editedon = date()


a lot of users manage a simple audit trail by storing

recordcreatedby
recordcreatedon
recordlasteditedby
recordlasteditedon

if you need a fuller history then it will get more involved

i would like the actions to take place prior to them hitting the save button since they will have to input their user ID again, this is incase it's a different user updating the record.
 
what would be the VB Code? sorry, i'm a complete noob
 
Last edited:

Users who are viewing this thread

Back
Top Bottom