FILTERED REPORT

D

dan.cawthorne

Hi all,


Need a Little Assistance,

I Have I Form Which Has a A-Z Filter Via Toggle Buttons With 27th
Button Called All

I Also Have a Listbox "List0" Which Filters Companys Via Service Once
Their assigned a Service,

Ive Created A Button Which Opens The Report, Showing The Filtered
Results

The Code Is as Follows

Private Sub Command47_Click()

DoCmd.OpenReport "Rrpt_Suppliers", acViewPreview, ,
WhereCondition:=Me.Filter

End Sub

This Works Fine, But The Report Shows Blank If I Don't Apply a Filter,
Either If Apply The "All" Filter Toggle Button, It Still Shows Blank,

Is There a way i get the film to Open Show All Records If a Filter
Hasent Been Selected on the Form?
 
A

Allen Browne

The form retains the filter even when FilterOn is not applied.

Try something like this:

Private Sub Command47_Click()
Dim strWhere As String

If Me.FilterOn Then
strWhere = Me.Filter
End If

DoCmd.OpenReport "Rrpt_Suppliers", acViewPreview, , strWhere
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top