"#Deleted" appears in data entry fields

SyntaxSocialist

Registered User.
Local time
Today, 19:49
Joined
Apr 18, 2013
Messages
109
On a data entry form bound to a single table, there is a subform displaying all the records in the source table.

If the user accidentally adds a record that they didn't mean to add (or if I add a record to test the form's functionality), and then right-click and delete the record, "#Deleted" appears in all the input controls.

This is rather ugly and I would like to avoid it if possible. Can anyone provide some more info on why this is happening and if there's a way to prevent it?
 
In the main form's "Del confirm" event, requery the sub form.

Private Sub Form_AfterDelConfirm(Status As Integer)
Me.YourSubForm'sName.Requery
End Sub
 
What exactly does no luck mean?

Well, it means that "#Deleted" still appears as described.

After some further investigation, though, I'm seeing that Private Sub Form_AfterDelConfirm(Status As Integer) isn't actually firing...

EDIT: It would be worth noting that "#Deleted" only appears in certain circumstances: If I open the form, add a record, and then delete it, there's no issue. But if I open, add, and then try to add another, a problem occurs (described here). If I then delete that newly created record, that's when "#Deleted" appears.

To more I examine the behaviour, the more I suspect that resolving the issue in the link above will solve this.
 
Last edited:
Solved. I was right about the issue being a byproduct of the problem described in the link. Check over there for the solution :)
 

Users who are viewing this thread

Back
Top Bottom