keek2a4
01-16-2008, 05:55 AM
Hello Everyone!
I have a table called tblStudent with fields studentID, studentName, studentAddress and dateUpdated.
I have a form that displays a record of the table tblStudent. In the BeforeUpdate event of the form, I have the following code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.Text206 = Now()
End Sub
which says, any changed made to any fields in the form, Before updating the record, update the field "dateUpdated" with the current date.
The field "dateUpdated" is called Me.Text206 in the form.
However, whenever I edit or make changes to the form, I keep getting the following error message:
Run-time error '-2147352567(80020009)':
You can't assign a value to this object.
Its quite strange because, I have the same code for the subject form which is linked to the subject table and it works fine.
I can't figure out why I keep getting this error, any help plz
Thanks,
I have a table called tblStudent with fields studentID, studentName, studentAddress and dateUpdated.
I have a form that displays a record of the table tblStudent. In the BeforeUpdate event of the form, I have the following code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.Text206 = Now()
End Sub
which says, any changed made to any fields in the form, Before updating the record, update the field "dateUpdated" with the current date.
The field "dateUpdated" is called Me.Text206 in the form.
However, whenever I edit or make changes to the form, I keep getting the following error message:
Run-time error '-2147352567(80020009)':
You can't assign a value to this object.
Its quite strange because, I have the same code for the subject form which is linked to the subject table and it works fine.
I can't figure out why I keep getting this error, any help plz
Thanks,