Are you troubled with this error? then 99% of chance that you have done something very similar to what i did, building a custom list form(new/edit) where custom list form(dataform) webpart is added. Also, i believe this is happen to be in only in SharePoint 2007(did not test in 2010/2013).
So when a custom list form webpart is added in the sharepoint designer, it supposed to work as is without any customizations but attachment functionality is broken as it was never completely built. MSFT has released a fix for it. There is a XSLT code snippet you need to copy from here to get this fixed, its pretty straightforward.