954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

testing for datachanged in datagrid

Could someone please suggest a way I can get the following sub to work? I'm trying to check to see if a field in a datagrid has been changed. I get runtime error 424 Object Required.
Thanks

[Private Sub DbGrid1_BeforeUpdate(Cancel As Integer)
If DBGrid1.Columns(1).Value.DataChanged = True Then ' Check for change in data.
MsgBox "field changed."
End If
End Sub ]

stan yost
Light Poster
29 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

Could someone please suggest a way I can get the following sub to work? I'm trying to check to see if a field in a datagrid has been changed. I get runtime error 424 Object Required. Thanks

[Private Sub DbGrid1_BeforeUpdate(Cancel As Integer) If DBGrid1.Columns(1).Value.DataChanged = True Then ' Check for change in data. MsgBox "field changed." End If End Sub ]

I figured it out. This is the solution:
[If DBGrid1.DataChanged = True Then ....]

stan yost
Light Poster
29 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You