Go Premium for a chance to win a PS4. Enter to Win

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
?
343 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
  • 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
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!

 
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

885 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