Selecting names from list for labels

DBL

Registered User.
Local time
Today, 21:36
Joined
Feb 20, 2002
Messages
659
I'm sure this can be done, just don't know where to start. I want to create a list of names for printing of labels from a table of names and addresses so, if the user needs to print a batch of random addresses from the available list they can select the few they need and print the necessary labels.

Suggestions?
 
You can print a report using multiple selections in a listbox like this:
Code:
Private Sub cmdView_Click()
    Dim strCondition As String
    
    For Each varItem In lstTest.ItemsSelected
        If strCondition = "" Then
            strCondition = "[testID] = " & lstTest.Column(0, varItem)
        Else
            strCondition = strCondition & " OR [testID] = " & lstTest.Column(0, varItem)
        End If
    Next varItem
    DoCmd.OpenReport "test", acViewPreview, , strCondition
End Sub

Dave
 
Sorry it's taken so long to come back and thank you for this. I've just had a chance to try it today and it's working great.

Thanks very much.

Dawn
 

Users who are viewing this thread

Back
Top Bottom