Solved IF function for filtered data

Kayleigh

Member
Local time
Today, 07:09
Joined
Sep 24, 2020
Messages
709
Hi there,
In my report I have textbox which should display the filter which the report was opened on. I would like to apply an IF function so if the report is not opened with filter ie all records, it will display 'all'. How would do I code this?
Thanks again!
 
In the reports On Load event:
Code:
    If Len(Me.Filter) > 0 Then
       Me.NameOfTextBox = Me.Filter
    Else
       Me.NameOfTextBox = "ALL"
    End If
Substitute NameOfTextBox with the actual name of your textbox control
 
if Isnull(Me.Filter) then

'but all filtering should be done outside the report.
on a form or query.
 

Users who are viewing this thread

Back
Top Bottom