I still don't know how to get this to show up in a custom Data View Web Part, but at least, with Brian's help, I've found a line of code that will allow you to display comments with a custom list form. Here's how you add a custom list form and display the comments field within SharePoint Designer 2007. I created a blank Web Part Page as my starting point.
- After selecting the correct web part zone, go to Insert > SharePoint Controls > Custom List Form:
- For this example, I'm going to use the following options:
- Find the line of code that references your Comments field (the text field with "Append Changes to Existing Text" turned on). If you're viewing your site in split mode, all you have to do is click on the comments field in the design area of your site.
- Replace the line that begins <xsl:value-of … and replace it with the following line of code:<SharePoint:AppendOnlyHistory runat="server" FieldName="V3Comments" ControlMode="Display"/>
FieldName is the name of your field and ControlMode is the type of mode you're using to display the data (so if your form is in edit mode, you may want to use "Edit.").
Here's a link to an MSDN article that explains some of this (although I had trouble understanding it):
Lastly, if anyone knows how to display comments such as this in a data view web part, I'm all ears. This solution is a good start. though, and you can even filter it via web part connections.