468,161 Members | 1,972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,161 developers. It's quick & easy.

Bound True Grid dont refresh after delete

I'm having a problem with the grid not getting refreshed after
deleting a record. Even though the record is deleted from the table. I
have the following code in a Delete button event:
sql = "Delete from OrderDetails where Orderid = " &
datOrderItems.Recordset!OrderId
sql = sql & " and ProductId = '" &
datOrderItems.Recordset!ProductId & "'"
gconn.Execute sql
datOrderItems.Recordset.Requery
datOrderItems.Recordset.MoveNext
If datOrderItems.Recordset.EOF Then
datOrderItems.Recordset.MoveLast
End If
datOrderItems.Recordset.Filter = "Orderid = " &
cmbOrders.Columns.Item(0).Text
grdOrderDetails.ReBind

Why does the row that was deleted still show in the grid after the
delete. If I change the filter on the recordset, it will display the
new results, but when I come back to the old Order#, the same contents
will display, even the deleted record. If I close the form and load it
again, the record gone. What the heck is going on. Please help.
Thanks Michael
Jul 17 '05 #1
0 1774

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Spitz | last post: by
3 posts views Thread by Matthew Woods | last post: by
6 posts views Thread by Frank | last post: by
2 posts views Thread by skanemupp | last post: by
reply views Thread by kamranasdasdas | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.