J
jeanulrich00
Hi
On a form named FrmMenu I have a multiple selected list box names
ListProjets
As I wanted to print selected items on a report I made a search in
this forum
I find out code that was given by Douglas J. Steele. So I copy the
code. Hers is my code
Private Sub Report_Open(Cancel As Integer)
Dim strProjets As String
Dim varSelected As Variant
For Each varSelected In Forms!FrmMenu!ListProjets.ItemSelected
strProjets = strProjets & Forms!FrmMenu!
ListProjets.ProjectDescription(varSelected) & ", "
Next varSelected
If Len(strProjets) > 0 Then
strProjets = Left$(strProjets, Len(strProjets) - 2)
End If
Me.Proj = strProjets
End Sub
FrmMenu is the form where the list box is situated
ListProjets is the name of the list box
Proj is the name of the text box on the report
Same thing happened to me as the one who previously received your
answer
the code stop on the line
For Each varSelected In Forms!FrmMenu!ListProjets.ItemSelected
(yellow when you debug) and the error is 438 or something like that.
When I try to open the report FrmMenu is open
Please I realy need help
thanks
On a form named FrmMenu I have a multiple selected list box names
ListProjets
As I wanted to print selected items on a report I made a search in
this forum
I find out code that was given by Douglas J. Steele. So I copy the
code. Hers is my code
Private Sub Report_Open(Cancel As Integer)
Dim strProjets As String
Dim varSelected As Variant
For Each varSelected In Forms!FrmMenu!ListProjets.ItemSelected
strProjets = strProjets & Forms!FrmMenu!
ListProjets.ProjectDescription(varSelected) & ", "
Next varSelected
If Len(strProjets) > 0 Then
strProjets = Left$(strProjets, Len(strProjets) - 2)
End If
Me.Proj = strProjets
End Sub
FrmMenu is the form where the list box is situated
ListProjets is the name of the list box
Proj is the name of the text box on the report
Same thing happened to me as the one who previously received your
answer
the code stop on the line
For Each varSelected In Forms!FrmMenu!ListProjets.ItemSelected
(yellow when you debug) and the error is 438 or something like that.
When I try to open the report FrmMenu is open
Please I realy need help
thanks