EricTheRed
Registered User.
- Local time
- Today, 12:01
- Joined
- Aug 7, 2003
- Messages
- 27
[I wasn't quite sure where this belonged in the forums, so I tossed it into General. Sorry if it seems a bit out of place!]
I have a query that takes two parameters, both specifying IDs to limit the search. The recordset returned by the query has only one text field: strCategoryName. I would like to be able to take all the results of the query, and create a single string out of them. For example:
If the query returned...
A
B
C
I would like to have "A, B, C" for display purposes. Is there any simple way to do this? I could see creating the query manually and looping over the results...
...but this doesn't strike me as the best solution. Ideas?
- Eric
I have a query that takes two parameters, both specifying IDs to limit the search. The recordset returned by the query has only one text field: strCategoryName. I would like to be able to take all the results of the query, and create a single string out of them. For example:
If the query returned...
A
B
C
I would like to have "A, B, C" for display purposes. Is there any simple way to do this? I could see creating the query manually and looping over the results...
PHP:
Dim str As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
...
Set rs = db.OpenRecordset("...")
...
While Not rs.EOF
str = str & rs![strCategoryName] & ", "
Wend
Me.lblDisplayMe.Caption = str
- Eric