P
Pete
I am using the "audit trail code of record changes in a form" (kb 197592 -
Access 2000) using Access 2003.
I have placed this code in a module and this works perfectly when called
from the main form.
However, when the code reaches the line where the (new) Value is checked
against the OldValue.
If ctl.Value <> ctl.OldValue Then
At this point, the app. raises an error:-
Run-time error '3251': "Operation is not supported for this type of object".
I am calling this code from the BeforeUpdate event of the sub form when this
error is generated.
I have even tried passing the sub form's reference to the Audit Trail
procedure but this raises the same error.
It's as though the OldValue property for a control is not available when
used on a subform.
Could someone please advise as to why this is and is there a possible
work-around.
Many thanks.
Access 2000) using Access 2003.
I have placed this code in a module and this works perfectly when called
from the main form.
However, when the code reaches the line where the (new) Value is checked
against the OldValue.
If ctl.Value <> ctl.OldValue Then
At this point, the app. raises an error:-
Run-time error '3251': "Operation is not supported for this type of object".
I am calling this code from the BeforeUpdate event of the sub form when this
error is generated.
I have even tried passing the sub form's reference to the Audit Trail
procedure but this raises the same error.
It's as though the OldValue property for a control is not available when
used on a subform.
Could someone please advise as to why this is and is there a possible
work-around.
Many thanks.