473,770 Members | 6,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntax for Reports! & GroupLevel

Hi there:

I can successfully control a report's GroupLevel ControlSource property by
using:

..Reports!rptEE STMT_A.GroupLev el(i).ControlSo urce = "CorpName"

where rptEESTMT_A is the actual name of the Access Report.

However, I have about 75 reports to process. Each report has its own unique
name. I don't want to create 75 different statements to process each of
the reports. For example:

..Reports!rptEE STMT_A.GroupLev el(i).ControlSo urce = "CorpName"
..Reports!rptEE STMT_B.GroupLev el(i).ControlSo urce = "CorpName"
..Reports!rptEE STMT_C.GroupLev el(i).ControlSo urce = "CorpName"
..Reports!rptEE STMT_D.GroupLev el(i).ControlSo urce = "CorpName"
and so on. This is long and tedious.

I created a function that would process each of the reports. I used a
string field called "sReportNam e" that stores the name of the Access Report
and used it in the statement:

..Reports!sRepo rtName.GroupLev el(i).ControlSo urce = "CorpName"

However, VB comes back with an error message saying that: "The report name
'sReportName' you entered is misspelled or refers to a report that isn't
open or doesn't exist.". This means VB does not recognize the string
variable "sReportNam e" actually stores the name of the Access Report.

Can someone please give me suggestions on how to write a function that could
process the reports instead of writing out separate statement for each
Access Report.

Thanks in Advance

Andrew
Nov 12 '05 #1
2 5770
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try:

..Reports(sRepo rtName).GroupLe vel(i).ControlS ource = "CorpName"

Reports is a collection. See the Access help articles on collections
to understand why the above works.

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP8egDoechKq OuFEgEQLddwCfWf RgiRfM4kG7sWSHN IU7rM/ZIngAn0uN
GuFe4b4OLvglLiJ 6n1AvdMOX
=/niS
-----END PGP SIGNATURE-----
Andrew wrote:
Hi there:

I can successfully control a report's GroupLevel ControlSource property by
using:

.Reports!rptEES TMT_A.GroupLeve l(i).ControlSou rce = "CorpName"

where rptEESTMT_A is the actual name of the Access Report.

However, I have about 75 reports to process. Each report has its own unique
name. I don't want to create 75 different statements to process each of
the reports. For example:

.Reports!rptEES TMT_A.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_B.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_C.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_D.GroupLeve l(i).ControlSou rce = "CorpName"
and so on. This is long and tedious.

I created a function that would process each of the reports. I used a
string field called "sReportNam e" that stores the name of the Access Report
and used it in the statement:

.Reports!sRepor tName.GroupLeve l(i).ControlSou rce = "CorpName"

However, VB comes back with an error message saying that: "The report name
'sReportName' you entered is misspelled or refers to a report that isn't
open or doesn't exist.". This means VB does not recognize the string
variable "sReportNam e" actually stores the name of the Access Report.

Can someone please give me suggestions on how to write a function that could
process the reports instead of writing out separate statement for each
Access Report.

Thanks in Advance

Andrew

Nov 12 '05 #2
Thank you for your help. It is working now. I can eliminate a lot of
repetitive codes. : )

"MGFoster" <me@privacy.com > wrote in message
news:9e******** ***********@new sread2.news.pas .earthlink.net. ..
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try:

.Reports(sRepor tName).GroupLev el(i).ControlSo urce = "CorpName"

Reports is a collection. See the Access help articles on collections
to understand why the above works.

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP8egDoechKq OuFEgEQLddwCfWf RgiRfM4kG7sWSHN IU7rM/ZIngAn0uN
GuFe4b4OLvglLiJ 6n1AvdMOX
=/niS
-----END PGP SIGNATURE-----
Andrew wrote:
Hi there:

I can successfully control a report's GroupLevel ControlSource property by using:

.Reports!rptEES TMT_A.GroupLeve l(i).ControlSou rce = "CorpName"

where rptEESTMT_A is the actual name of the Access Report.

However, I have about 75 reports to process. Each report has its own unique name. I don't want to create 75 different statements to process each of the reports. For example:

.Reports!rptEES TMT_A.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_B.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_C.GroupLeve l(i).ControlSou rce = "CorpName"
.Reports!rptEES TMT_D.GroupLeve l(i).ControlSou rce = "CorpName"
and so on. This is long and tedious.

I created a function that would process each of the reports. I used a
string field called "sReportNam e" that stores the name of the Access Report and used it in the statement:

.Reports!sRepor tName.GroupLeve l(i).ControlSou rce = "CorpName"

However, VB comes back with an error message saying that: "The report name 'sReportName' you entered is misspelled or refers to a report that isn't
open or doesn't exist.". This means VB does not recognize the string
variable "sReportNam e" actually stores the name of the Access Report.

Can someone please give me suggestions on how to write a function that could process the reports instead of writing out separate statement for each
Access Report.

Thanks in Advance

Andrew


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3353
by: Jan van Veldhuizen | last post by:
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city city_id 1 john newyork null
4
1725
by: Ryan Gaffuri | last post by:
I know that this works. I just don't get the syntax. I know its checking the OS. just not sure how it works. var v = navigator.appVersion.toUpperCase() if (1+v.indexOf('WIN98') os = 'Win98'; else if (1+v.indexOf('WINNT') os = 'WinnT';
8
4337
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. Basically I want to say: If fk_ID is in list then do these statements to that record
3
3108
by: KevLow | last post by:
Hi, Hope some kind soul can help me out here.. I'm trying to programmatically modify the column headings of a crosstab query such that it can be dynamic based on user specified period (Month Year to Month Year) So far i have tried to use the following code: //
5
4516
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by including the -q64 option in xlC compiler. And we are able to link all these libraries to one of the main applications and generate an executable. SKLoader. But, when we try to run this main executable, we are getting the following errors:
1
1028
by: Rich | last post by:
Hello, What syntax can I use to reach an application file located in a different subfolder than the exe file? AppDir l__Bin l l__Debug l l__my.exe l
3
2264
by: Birky | last post by:
Hello, I’m hoping you can help me out with two issues I’m having with my code. I have an Access Report named Report_Project_Event_Log which I have calling a Form named “Custom_Code_lookup” which allows a user to select data for the report. I have a hidden txt object within this form named txtContinue which is either set to “no” or “yes”. I believe I have everything running correctly except for my cancel code below. When the Cancel button is...
7
2189
by: Ray Dillinger | last post by:
Hi. I'm having a problem and I really want to understand it. Here's the situation: I have an array of pointers, and each pointer is the head of a linked list of structs. The structs are typedef'd to have the type name 'event.' It's a simple open hash table used to implement events in a game. So, I have a routine that returns the address of one of the pointers in the array, or returns NULL for a key out of range (meaning no bucket for...
4
1402
by: Call Me Tom | last post by:
I have the following PHP/MySQL code segment $query2="UPDATE reports SET fsacars_rep_url = $url_new WHERE pilot_id = $pid"; echo"$query2"; $result2=mysql_query($query2) or die(mysql_error());
0
1526
by: Brad King | last post by:
Hello all, I am going to describe my specific problem. Also, I can program in C++ & Java although I am a little rusty. I took both classes in order to get my MIS degree but have not touched them since. Kid gloves with me would be awesome. The Background: I am pulling data out of student management system (OS/400 /DB2) into Crystal Reports. I have no command line access and will not be able to get it. I can use Crystal to query the...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10005
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8887
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.