Solved

What is the difference between "Me.Recordset" and "Me.Report.Recordset" in an Access Report?

Posted on 2009-04-08
6
338 Views
Last Modified: 2013-11-28
I'm developing an Access 2007 "project" (.adp) as a front-end to a SQL Server 2005 Express database.

I have an Access "Report" that is based on a SQL Server "View".
I would like to trap the report (which is opened with a "WHERE" clause) if there are no records to print.

In the Report's "Report_Load" procedure I can check the "Me.Recordset.RecordCount" value, but I notice there is also a "Me.Report.Recordset.Recordcount" that can be checked.

Can someone explain the difference between a Report's "Me.Recordset" and "Me.Report.Recordset" and whether they are the same thing or might ever contain different values, and which of the two might be the more reliable to use?

Many thanks.
0
Comment
Question by:colinasad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 250 total points
ID: 24096226
Could you not use the NoData event to capture a report with no data?

No real different between Me.Recordset and Me.Report.Recordset, not that I know off anyway
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 250 total points
ID: 24096422
Like rocki said, I don't think there is a difference between Me.Recordset and Me.Report.Recordset in the context you are using this.

The .Report property does have its applications though.

Consider the following as a reference to a subreport:

Me.MySubreportName

That refers to the "subreport control", or container that houses the subreport.  You can use this to get/set properties such as the border of the subreport, the master/child links the enabled or visible properties...

However to refer to the controls and properties within the subreport, you would need to add the .reprort property:

Me.MySubreportName.Report

With this addition, you are referring to the subreport as a report, not just a container, so you can refer to its controls etc:

Me.MySubreportName.Report.Mytextbox
Me.MySubreportName.Report.Recordset
etc...
0
 

Author Closing Comment

by:colinasad
ID: 31567980
Thanks for the prompt responses.
I have been "incomminicado" for a couple of days after posting the question.
I hope you don't mind me splitting the points because you both gave me good advice.
Many thanks.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 65

Expert Comment

by:rockiroads
ID: 24113986
No worries, glad we could all help :)
0
 
LVL 61

Expert Comment

by:mbizup
ID: 24114497
Ditto!

Rocki (and colinasad),

Just FYI, the "Grading Comments" that Askers post while closing questions are only visible to the Askers and Experts whose answers have been accepted.

To everyone else, It just looks like we struck up a random conversation. ;-)
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24114576
oooh, I didnt know that. Thanks for that bit of useful info.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question