By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,072 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,072 IT Pros & Developers. It's quick & easy.

Don't show master if subreport is empty

P: 1
Hi all,

I'm new here and new to access and programing and pretty much everything I'm asking for help on. I hope you can help me out.

I have an access database. I have a report that lists students and a subreport that points to a different query that lists the subjects that are overdue. I do this by using <Date () in my query for subjects that do not have a result.

My report prints fine but I don't want it to list any students who do not have any over due subjects (or their subreport or child report is empty). I've searched for an hour and I'm not sure how to do this.

Thanks

Stich
Oct 9 '08 #1
Share this Question
Share on Google+
1 Reply


P: 53
Hi Stichtek,

There are a few ways to do this.

The easiest way I can come up with is to set the where condition on the query itself.

Open the main report query and add the second query, choose a non calculated field, and select Count and in the criteria of this column, type <> 0 (does not equal zero)

this should filter out any record that does not have a corresponding overdue record.

another way is to have a look at the event that occurs when you open the report from the form.

it should look something like this

docmd.openreport "<report name>", acViewPreview,<filter> ,<where condition>

add a condition into the where condition of the statement.

something like - Dcount("<PK or unique id>","Query Name") <> 0

either should eliminate any records from the report that do not match the criteria.

Hope this helps.


Leon
Oct 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.