Hide record based on field value

asu81

Registered User.
Local time
Today, 17:17
Joined
May 26, 2012
Messages
47
Hi!
How do I hide records in a report based on a critera, for example textfield value?

I saw a version of this somewhere and applied it to my db:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Resursnr = "UL" Then
Cancel = True
End If
End Sub

But nothing happends when I open the report.. EDIT: the report opens as usual.

In my case I want all records that have resursnr="UL" to be hidden in the report.

Resursnr is a textfield. EDIT: data type=text

Any help much appreciated!
 
Rather than hide them, I'd exclude them in the first place, in the query underlying the report.

SELECT...
FROM...
WHERE resursnr<>"UL"
 
I'll try that, thx!
 
No problem! Post back if you get stuck.
 

Users who are viewing this thread

Back
Top Bottom