I've got this quirk that occassionally creates a blank record, so to clean them up, I've put in a snippet that should delete all of those blanks on the next form current event, but it's not working...
the records are in a table related to the form's source table and populate a subform; the user can add new records on the subform
Public Sub DoSQLDeleteBlankInstallationNotes(frm As Access.Form)
Dim sSQL As String
sSQL = "Delete from tbeInstallationNotes" & _
" WHERE len(nz([InstallationNote],"")) =0;"
DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True
End Sub
so to check myself, on the sub form right next to the text box with the value [InstallationNote], I added another text box whose value is:
=len(nz([InstallationNote],""))
low and behold, blank records have a zero value
and then another text box
=len(nz([InstallationNote],"")) = 0
and I get -1's
dispite this, the blank records do not delete (?!)
preplexed
(but with thanks in advance),
mark