Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-08
6
Medium Priority
?
342 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 1000 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 1000 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

704 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