Example

Change User Edits.


Change User Edits code snippet.

The following is a simple example of how to change what a user has entered. The code snippet assumes you have a DGrid control named "DGrid1" sited on the form.


Private Sub DGrid1_BeforeEdit(ByVal Row As Long, ByVal Col As Long, _
    OldVal As String, NewVal As String, Cancel As Boolean, CancelMsg As String)
    'Convert anything entered in the fifth column
    'of the grid to upper case.
    If Col = 4 Then
        NewVal = UCase(NewVal)
    End If
End Sub