report filters

skate

Registered User.
Local time
Today, 03:27
Joined
May 22, 2002
Messages
136
I have a listbox that filters according to my users entry. Say all contacts for a certain location. Then I want the user to be able to get a print out of this in report form. how would I go about this?
 
This is what I used for the txt box that requires a search entry to filter the listbox. From here I don't know where to go in terms of printing a report. I wonder if I should completely change my approach?

Private Sub txtDescription_Change()
Dim txtSearchString As Variant
Dim strSQL As String
txtSearchString = Me![TxtDescription].Text
strSQL = "SELECT [Files].[File Index], [Customer].[Customer ID], [Files].[Project], [Files].[Eng], [Files].[Proposal], [Files].[Mill Company], [Files].[Mill Location], [Files].[Description] FROM Files INNER JOIN Customer ON [Files].[Customer Index]=[Customer].[Customer Index]"
strSQL = strSQL & "WHERE ((Files.[Description]) Like '" & txtSearchString & "*') "
strSQL = strSQL & "ORDER BY Files.[Description ], Files.[Mill Location],Files.[Mill Company]"
Me!lstResults.RowSource = strSQL
Me!lstResults.Requery
Me!TxtDescription.SetFocus
End Sub
 

Users who are viewing this thread

Back
Top Bottom