[Access Basic] How to find and then "timestamp" updated unbound fields ?

C

controlShift

Hello,


I have forms with unbound fields.
I save manually (with access basic script) the fields.

How can I find Only the fields which have been modified
to replace the timestamp ? (dirty property ? or sendvalue macro ?)


Thank you
Anthony
 
I

Iryna Roy

controlShift said:
Hello,


I have forms with unbound fields.
I save manually (with access basic script) the fields.

How can I find Only the fields which have been modified
to replace the timestamp ? (dirty property ? or sendvalue macro ?)

Put the code AfterUpdate for each field, this code will work when the
changes were applied to the target field
 
S

SteveS

This is totally air code, but you might try:

If Me.ControlName <> Me.ControlName.OldValue then
'code to save new value or whatever
End If

HTH

Steve
 
I

Iryna Roy

SteveS said:
This is totally air code, but you might try:

If Me.ControlName <> Me.ControlName.OldValue then
'code to save new value or whatever
End If

Are you sure that OldValue will work for unbound field :)
 
C

controlShift

Do I need to create a field in table for timestamp
for each field in the form ?


Thank you
 
I

Iryna Roy

controlShift said:
Do I need to create a field in table for timestamp
for each field in the form ?


Thank you

Do you need to track the changes in each field??? time and date?
what I would do in this case (if I need to track changes) , I would create
the table with fields: RecID;FieldName;TimeStamp;UserWhoChanged, etc.

then will crete the function which will add the record to this table, if the
value of the field was changed. And I will put Call ThisFunction in
AfterUpdate event for each field.

This is just one minute thought, don't take it too close to your heart, but
if it could help, I will glad. It is really hard to decide, when the full
task is unknown.

Regards,
Iryna Roy
 
C

controlShift

Thank you for the answer,

But i am a newbie in Access basic script so :
Do you need to track the changes in each field??? time >and date?
Yes

AfterUpdate event for each field.

but my fields are unbound.
How to udpate a field timestamp
in that case ?

It would be great if you had some code ?


Thanks.
Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top