M
mfleet1973
Hi.
A scenario has come up in which I'm not sure how to handle. What is
happening is the user enters information in a cell of the grid. If the
user then quits the application as soon as he finishes entering the
data, the data entered in the cell is not saved. I have the following
code in the closing event of the form:
If DataSet.HasChanges Then
Try
DataAdapter.Update(DataSet.GetChanges, "Table")
DataSet.AcceptChanges()
Catch e As Exception
MsgBox(e.message)
Exit Sub
End Try
End If
However, if the user tabs to the next cell, the data is saved. Is
there something that can be done to save the data without having to
tell the users that they must tab from the cell upon entering data? I
tried replicating a tab key press (SendKeys.Send("{Tab}")) before
updating but this did not fix it.
Thanks a lot for the past and future help!
Mike.
A scenario has come up in which I'm not sure how to handle. What is
happening is the user enters information in a cell of the grid. If the
user then quits the application as soon as he finishes entering the
data, the data entered in the cell is not saved. I have the following
code in the closing event of the form:
If DataSet.HasChanges Then
Try
DataAdapter.Update(DataSet.GetChanges, "Table")
DataSet.AcceptChanges()
Catch e As Exception
MsgBox(e.message)
Exit Sub
End Try
End If
However, if the user tabs to the next cell, the data is saved. Is
there something that can be done to save the data without having to
tell the users that they must tab from the cell upon entering data? I
tried replicating a tab key press (SendKeys.Send("{Tab}")) before
updating but this did not fix it.
Thanks a lot for the past and future help!
Mike.