Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print one report for each list choice
Message
De
05/09/2001 09:37:12
 
 
À
Tous
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Print one report for each list choice
Divers
Thread ID:
00552468
Message ID:
00552468
Vues:
44
I am obviously doing something wrong but I can't figure out what. I want to print one report for each employee selected in a list box. I either get a blank report or I get a report with all employees but never a report for each employee selected. I put a label (nowprinting) on my form to see if I was atleast using my listbox correctly. I get a number not an employee name.

The code is below: the field in the lisbox is [product].[moldname]
custname is supposed to refer to the moldname (it doesn't)
list4 is the name of my lisbox
Dim custname, WClause
For Each custname In Me![List4].ItemsSelected
  Me![nowprinting].Caption = custname

   WClause = "[moldname] = '" & custname & "'"

DoCmd.OpenReport stDocName, acPreview, , WClause

Next
For custname = 0 To Me![List4].ListCount - 1
   Me![List4].Selected(lrow:=custname) = False
Next
I'm sure this is very simple but it's making me crazy. TIA for any help.
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform