Unanswered: String made from unique records in a recordset
I need to generate a string based on unique values in a recordset. This text string is going to be used on a report to list which departments are being represented in the results of a report. I have created a subform who's recordset is created from a select distinct sql statement, the recordset only includes a single colum and a record for each individual department. How can I list the all of the records on a single text line?
you have a form displaying the desired recordset....
dim longString as string
dim recs as recordset
set recs = me.recordsetclone
do while not .eof()
longString = longString & !whateverIsYourFieldName
'or if you want a separator between fields
'longString = longString & !whateverIsYourFieldName & " "
myTextBox.value = longString