Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing From a List
Message
De
04/09/2001 13:41:52
 
 
À
04/09/2001 13:06:59
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00552114
Message ID:
00552177
Vues:
16
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.

list4 is the name of the listbox and it is populated by the empname field in the datasource. I want the user to be able to select any number of employees not just one or all. ex: If there are 10 employees and they want to report on 4 of them I want them to be able to do this.
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform