I recently requested help in compiling a series of records into a single field with a comma separating the records and was directed to a tutorial website which has pretty much helped out... Here's the link: http://support.microsoft.com/default.aspx?...uct=acc2000#kb2
The general code is as follows:
Sub grpHeaderCategoryID_Format (Cancel As Integer, FormatCount As Integer)
Me!AllProducts = Null
FirstPass = False
End Sub
Followed by:
Sub Detail_Format (Cancel As Integer, FormatCount As Integer)
On Local Error GoTo Detail_Format_Err
If Not FirstPass Then
Me!AllProducts = Me![ProductName]
FirstPass = True
Else
Me!AllProducts = Me!AllProducts & ", " & Me![ProductName]
End If
Detail_Format_End:
Exit Sub
Detail_Format_Err:
MsgBox Error$
Resume Detail_Format_End
End Sub
That has worked great... (with some modifications specific to my db of course...)
I am, however, still stuck... I would like this sub to do a series of three similar operations to produce three separate comma-delineated fields for a single report. I'm sure that this is a basic coding, but how do I essentially run the above operation for one comma-delineated field, then do the same for another source field and destination field on the same report, then repeat that for another source and destination?
Since the tutorial has tied the sub to the ONFormat Event, I'm fairly sure that this all has to be coded in one long string, but am not well-versed enough in the coding to get it to run. I can run it for one field only, more than one and I'm stuck...
Any help would really, really, really be appreciated...