andreymurom
Programmer
I had this code in Before_Update procedure:
If .....
Me![chkXXX] = Me![chkXXX].OldValue
End If
If I try to enter a new record and don't touch this check Box and then move to another record, I am getting "Run-time Error '2113'. The value you entered isn't valid for this field".
I could work around this problem by changing the code to:
If .....
If Me![chkXXX].OldValue = True Then
Me![chkXXX] = True
Else
Me![chkXXX] = False
End If
End If
So it looks like something is wrong with the data type or data format that .OldValue returns.
I looked at the help and OldValue is of variant data type and returns the same data type that it is getting, including Boolean. I tried to change data format in the table field that populates that check box from Yes/No to True/False but result is the same.
Can anybody suggest me what is going on and what the proper way to fix the problem would be?
Thank you very much,
Andre
If .....
Me![chkXXX] = Me![chkXXX].OldValue
End If
If I try to enter a new record and don't touch this check Box and then move to another record, I am getting "Run-time Error '2113'. The value you entered isn't valid for this field".
I could work around this problem by changing the code to:
If .....
If Me![chkXXX].OldValue = True Then
Me![chkXXX] = True
Else
Me![chkXXX] = False
End If
End If
So it looks like something is wrong with the data type or data format that .OldValue returns.
I looked at the help and OldValue is of variant data type and returns the same data type that it is getting, including Boolean. I tried to change data format in the table field that populates that check box from Yes/No to True/False but result is the same.
Can anybody suggest me what is going on and what the proper way to fix the problem would be?
Thank you very much,
Andre