I have the following code for the current cell changed event of my datagrid:
If grdGases.CurrentCell.ColumnNumber = 10 Then
If ((Val(grdGases.Item(grdGases.CurrentRowIndex, 9)) < 6 Or Val(grdGases.Item(grdGases.CurrentRowIndex, 9)) > 8)) Then
MsgBox("Value Must Be Between 6 And 8")
End If
End If
This displays the message box if the user enters an inappropriate value in column 9, but I need to set the focus back there as well. Does anyone have any ideas on how to do this?
Thanks in advance,
Jeremy
If grdGases.CurrentCell.ColumnNumber = 10 Then
If ((Val(grdGases.Item(grdGases.CurrentRowIndex, 9)) < 6 Or Val(grdGases.Item(grdGases.CurrentRowIndex, 9)) > 8)) Then
MsgBox("Value Must Be Between 6 And 8")
End If
End If
This displays the message box if the user enters an inappropriate value in column 9, but I need to set the focus back there as well. Does anyone have any ideas on how to do this?
Thanks in advance,
Jeremy