Filter Report to eliminate blanks...

pantscat

Registered User.
Local time
Today, 22:01
Joined
Jun 23, 2003
Messages
11
Filter Report to eliminate blanks... using VBA! (help!)

Hello all,

I'm currently playing around with a school report system and I have a problem whereby not every pupil studies every subject - and so I want to stop the "blank" reports from printing.

I thought that perhaps I could it using the "On Open" event on the report with something like this:

DoCmd.ApplyFilter , ("Me.txt_art_att" > "0")

"txt_art_att" is a text box that gets the pupils' Art score (from the results table) using the dlookup function.
I guess rather than using "> 0" something like "Is not null" would be better but I'm not sure how to do that... still learning to play VBA by ear....

Any advice would be gratefully received,
Thanks,

Ant :confused:
 
Last edited:
Can Shrink

I believe you need to set the Can Grow / Can Shrink in the forms main property window to yes. This will work as long as the fields are not parrallel to each other (will not work on labels).
Hope this helps,
Phil.
 
Thanks for the suggestion - but I'm afraid that it wont do what I want it to do...

Edit: I should explain why... sorry was rushed off to drink coffee!

There is one recordset per page - and the fields come from two or three different related tables - so the grow-shrink thingy wont do the trick for me.
 
Last edited:
Help

I am sure help will not be far away. This forum has helped me no ends as I to am a novice!!
 
Thanks Mr. Scouser!

So... can any of you other clever bods out there help?

In a nutshell... all I want to do is:

Apply a filter to a textbox on a report which gets its value with the Dlookup command.

I'm not even sure if it is possible... :confused:

Cheers :D
 

Users who are viewing this thread

Back
Top Bottom