saseow
Posts: 744
|
| Posted: 02/10/2009, 6:33 AM |
|
I have a record form and whenever a record is created or changed I want to update two hidden fields, "last_modified" (a datetime field) and "modified_by" (an integer field).
I have set the default value of "modified_by" to CCGetUserID()
and
"last_modified" to Date().
Neither of them update to the database.
Any idea why this is not working?
Thanks.
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 02/10/2009, 7:41 AM |
|
Hi
Just a guess but when a data field already has data in it the default value is not applied. So. your example above would only place the current datetime and userid when the record is initially created.
After a record is created and being updated you will have to put the current datetime and user id into your hidden fields in the before show event.
In fact you could in all cases load up those fields in the before show event and all should work
Have fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
saseow
Posts: 744
|
| Posted: 02/10/2009, 9:26 AM |
|
Thanks jjrjr1,
That works like a dream!
|
 |
 |
|