B
Ben
I have a continuous form with a bound checkbox ("ExportSelect") on
each line. I would like to have a command button on the form footer
with an onClick event that finds all the records with checked
checkboxes. Each time a checkbox is true I'd like the string to add to
itself the value of another field on that record....
I've used the "count(iif([ExportSelect]=true,1,null))" on an unbound
field in the footer to successfully count the checked records, but I
can't apply this to create a string I want.
Example of my continuous form:
[ ] dog
[x] cat
[x] zebra
[ ] horse
[x] fish
In the onClick event of the button at the footer I'd like to create
the string: "cat,zebra,fish"
Private Sub TargetExcel_Click()
Dim frm As Form
Dim strTarget as String
Set frm = Forms!frmSearchResults
For Each Record In frm
If Me.ExportSelect = True Then
strTarget = strTarget & "," & Me.TestNum_
End If
Next Record
End Sub
However, this just code would just create the string
"fish,fish,fish,fish,fish"
Thanks in advance.
each line. I would like to have a command button on the form footer
with an onClick event that finds all the records with checked
checkboxes. Each time a checkbox is true I'd like the string to add to
itself the value of another field on that record....
I've used the "count(iif([ExportSelect]=true,1,null))" on an unbound
field in the footer to successfully count the checked records, but I
can't apply this to create a string I want.
Example of my continuous form:
[ ] dog
[x] cat
[x] zebra
[ ] horse
[x] fish
In the onClick event of the button at the footer I'd like to create
the string: "cat,zebra,fish"
Private Sub TargetExcel_Click()
Dim frm As Form
Dim strTarget as String
Set frm = Forms!frmSearchResults
For Each Record In frm
If Me.ExportSelect = True Then
strTarget = strTarget & "," & Me.TestNum_
End If
Next Record
End Sub
However, this just code would just create the string
"fish,fish,fish,fish,fish"
Thanks in advance.