Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing From a List
Message
De
04/09/2001 13:06:59
 
 
À
04/09/2001 12:11:11
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00552114
Message ID:
00552162
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
>I have a form with a listbox (list4) which displays all employees. When the user presses the ALL button all employees are selected. I want to print a report for all selected employees. The following code keeps prompting me to enter a parameter value for list4. I thought if all of the employees were selected, that was the parameter. Any help would be appreciated.
>
>
Const RName = "Transaction Report"
>Dim Name, WClause
>For Each Name In Me![List4].ItemsSelected
>   WClause = "[list4] = '" & Name & "'"
>DoCmd.OpenReport ReportName:=RName, WhereCondition:=WClause, View:=acViewPreview
>
>Next
>For Name = 0 To Me![List4].ListCount - 1
>   Me![List4].Selected(lrow:=Name) = False
>Next
So list4 is a field in the report's data source?

Seems to me, if you have selected all employees (meaning no filter) the WhereCondition should not be used. In which case, you could have two ways of calling the report, one with wherecondition if all items are not selected and one where the selected list is passed to wherecondition.

Or did I misunderstood something?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform