LifeDragon
Programmer
I have an OCX in an Access 2000 application that does the following code when I click on the Delete button
ParentForm.Application.DoCmd.SetWarnings False
ParentForm.AllowDeletions = True
ParentForm.Application.DoCmd.RunCommand acCmdDeleteRecord
ParentForm.Application.DoCmd.SetWarnings True
ParentFrom.AllowDeletions = False
That part of code works great, but if I delete the last record of a table,
A Message Pops up saying "No Current Data" 2 or 3 times in a row and then it continues like nothing happened, but it is really annoying when the users see it.
As I saw the bug comes from the fact that the form still points to the record, even though it's Deleted
Proof : When I leave my mouse on the Scroll Bar, it says : "Record: 1 of 0"
So, my question is : Is there a way to force the form to see that there isn't anymore record?![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
ParentForm.Application.DoCmd.SetWarnings False
ParentForm.AllowDeletions = True
ParentForm.Application.DoCmd.RunCommand acCmdDeleteRecord
ParentForm.Application.DoCmd.SetWarnings True
ParentFrom.AllowDeletions = False
That part of code works great, but if I delete the last record of a table,
A Message Pops up saying "No Current Data" 2 or 3 times in a row and then it continues like nothing happened, but it is really annoying when the users see it.
As I saw the bug comes from the fact that the form still points to the record, even though it's Deleted
Proof : When I leave my mouse on the Scroll Bar, it says : "Record: 1 of 0"
So, my question is : Is there a way to force the form to see that there isn't anymore record?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)