mas7357
Posts: 29
|
| Posted: 08/31/2007, 8:13 AM |
|
I copied this from a CC example and made some changes to reflect my table names etc and it doesn't work- any suggestions. What I want to do is concatanate all the values of the Gender field in the tblSwimmerDetailsConfidential table and display it in a label on a page. Currently the code is in the before show event of the label. When the page loads I get no value in the label and no error message!
Final strentch of first codecharge studio project for a local charity (Swimming club) - doing in spare time for nothing and nearly going crazy!
Dim DBConnection1
Dim rsGroups
Dim strGroups
Dim SQL
Set DBConnection1 = New clsDBConnection1
DBConnection1.Open
strGroups = ""
SQL = "SELECT Gender FROM tblSwimmerDetailsConfidential"
Set rsGroups = DBConnection1.Execute(SQL)
While rsGroups.EOF
strGroups = IIf(strGroups = "", rsGroups("Gender"), ", " & rsGroups("Gender"))
rsGroups.MoveNext
Wend
NewRecord1.Label1.Value=strGroups
_________________
MikeS |
 |
 |
|