Solved

data in Subform/Subreport

Posted on 2010-11-22
46
472 Views
Last Modified: 2012-05-10
the Source Object for a Subform/Subreport is
Report.rpt_all_pinned_Data
under this report, the record source is blank. it populates the same info wherever it is placed/called (in any reports).

how can i drill down to see where it is getting the data from?

this is in v2002

thanks
subrpt.bmp
0
Comment
Question by:anushahanna
  • 24
  • 14
  • 4
  • +2
46 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 125 total points
ID: 34191174
<<how can i drill down to see where it is getting the data from?>>

  you'll need to hunt for it.  Check the reports OnOpen, event first.

JimD.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34191258
OpOpen has
------------------
Option Compare Database

Private Sub Report_Open(Cancel As Integer)
  Call format_fields
End Sub
------------------------
format_fields() just gives the font and colors etc but no data pull.

on
close, activate, no data, on page, on error all are blank/empty
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 125 total points
ID: 34191406
You'll have to check any "object" which interacts with this report, or with any report that uses that as a subreport. A simple way is to search the VBA source for the name of that report, although this won't tell you about macros.

You might consider investing in something like Rick Fisher's Find and Replace utility (www.rickworld.com). For the money (less than $40 US) it's an invaluable tool.
0
 
LVL 75
ID: 34191571
Can you upload the db?
0
 
LVL 44

Assisted Solution

by:GRayL
GRayL earned 125 total points
ID: 34193234
? Forms!myReport.Form.srpReport.RecordSource
--------------^--realRepName-^-realSubRepName

assumes myReport is already open.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34193581
LSM, do you mean 'modules' by VBA source?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34193584
DatabaseMX, due to confidential data, i am not able to; otherwise, i would have been glad to.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34193588
>>? Forms!myReport.Form.srpReport.RecordSource
--------------^--realRepName-^-realSubRepName

where do i run this from?
0
 
LVL 84
ID: 34195713
<LSM, do you mean 'modules' by VBA source? >

Yes. You'll need to search this for any occurence of the Report name. As I stated, using the standard builtin Access search function (from the VBA Editor) won't search macros. If you've made extensive use of macros, then you'll need a 3rd party utility like F&R.

0
 
LVL 6

Author Comment

by:anushahanna
ID: 34196729
access does not feature to search within macros?

can we see (the code) what is behind macros?
0
 
LVL 75
ID: 34198443


As suggested twice above, make this easy on yourself.  Download this:

http://www.rickworld.com/beta   (don't worry about the word Beta)

I believe you can still try it for 30 days.

mx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34200188
i am glad to try it..thanks

if you use that tool, can you guide me- i see the Tools->add in only in the replace9.mde file, not in any of the other mdb files that i am interested in. do you search for any other database from the replace9.mde file?
0
 
LVL 75
ID: 34200334
You need to follow the installation instructions in Readme.txt file, which I have attached.

mx
F-R-readme.txt
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34200437
mx, that part is done, and i can see the effect: replace9.mde has under Tools-> Add-ins->Find and replace; but test.mdb does not have that option (both are access 2000).

you would expect that option to be shown in all access database on that machine?
0
 
LVL 75
ID: 34200556
"you would expect that option to be shown in all access database on that machine?"
Definitely.


Capture1.gif
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34201914
that is what i would have though, too..

i know the install must have worked because that option is seen on the F&R mde..

to install, I just clicked on install, and it just done..

any thoughts what i can try differently..
userdb.jpg
fr90.jpg
0
 
LVL 75
ID: 34201960
Can you upload 'test.mdb' ?

OK ... wait, that first JPG is a *Custom* Tools menu ... look at the items.

How down the Shift Key while opening the db ... then see if you get the *normal* Access menu ...

mx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34273210
mx, just got access to check again..

yes, you are right - probably the custom tools menu.. when i shift key on a mdw-less DB, i get the regular tools menu.. when it PW protected, then i get the custom tools menu.. any thoughts, how i can get the regular tools menu on the pw protected db.

thanks
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34273300
also, would the F&R work on a non-pw protected file the same way, say, as if the same DB should be password protected?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34273307
when i tried it on the non-pw database, i get the following message- the * says search in all, right? how do you tell it to search in all code?
search.jpg
0
 
LVL 84
ID: 34273373
You must click the various objects you wish to search in. For example, if you want to search Tables, click the button labeled "Tables".
0
 
LVL 75
ID: 34274054
Yes, as noted by LSM, click the Tables, Queries .... Modules buttons below Search In.
Then, check
Find Only, No Replace
Log Finds/Changes
Find without asking

then finally ... Find

once done, click View Log

mx
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 6

Author Comment

by:anushahanna
ID: 34285696
how can i search if pw protected. if i use mdw, then i get only the custom tools menu..


error.bmp
0
 
LVL 75
ID: 34285723
Can I ask why you would need to do that if ... you are not in development mode, ie you have bypassed startup code using holding Shift Key down ...?

mx
0
 
LVL 75
ID: 34285754
You can ... if you really want to, add the Add-Ins menu to your custom Menu ... I just tried it and it works ... see screen shot:

mx
Capture1.gif
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34285997
thanks a lot- i got it now.. i search for in modules and macros.. i searched for the subreport name, but it came back with nothing.. what exactly should i be searching for as..

all i need really is the code that populates the label, so i can change it, and that is in the sub-report.
0
 
LVL 75
ID: 34286049
"what exactly should i be searching for as.."

Sorry, but I'm kind of lost at this point.  Maybe you could summarize exactly what the issue is at this point ?

mx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34286056
mx, yes, i was in dev mode yet .. what i did i tried to open a module, and it asked for password, and then it did not complain.. i would like to learn to add that to custom tools, too.. if it is quick and easy, kindly share how to do it.. if not, i would rather not distract away from the issue..
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34286072
>>Sorry, but I'm kind of lost at this point.  Maybe you could summarize exactly what the issue is at this point ?

sure.

the label is the same in all the report, and it is displaying wrong data. it is a sub report. but I am not able to see the code behind the subreport. hence wondering if the subreport name is referenced in the modules, and see what logic is used to populate the label.

thanks
0
 
LVL 75
ID: 34286283
"i would like to learn to add that to custom tools, too"
Well, that is pretty easy to do ... no code ...

Everything you need is here (A2003 and prior only)- no code ... see this link:
Everything you need is here (A2003 and prior only)- no code ... see this link:

http://www.jamiessoftware.tk/articles/menubars.html
       
Not sure it that article mentions it, but ... when you are in the Customize mode (dialog) ... if you hold down the Control key,

you can drop and drag (ie, copy) menu items from one place to another ... handy for making a new menu that is similar another one.

0
 
LVL 75
ID: 34286383
ok ... well, you should ... be able to search for pretty much anything you want using F&R ... be sure to check all options in the Search In area ...

mx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34286494
thanks-
if the reportname whose picture is in the main question- that is what i want to search, right?

that is what is displaying the label in all the reports.
0
 
LVL 75
ID: 34286545
Well, seems so ... this:

rpt_all_pinned_Data

mx
0
 
LVL 84
ID: 34290421
<the label is the same in all the report, and it is displaying wrong data. it is a sub report. but I am not able to see the code behind the subreport. >

Why are you not able to see the code behind the subreport? If you open this in Design mode, then you should be able to review the code (either manually or with F&R).

If you cannot actually get into Design mode, or if the VBA code has been protected, then you'll need to find another file where you can actually get to the code, or that is not protected.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34297962
mx, it has to be under macros or modules only, right?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34297966
LSM, there is no record source for the sub report, that is mentioned..

and as in #34191258, the only code behind the report is ...
Option Compare Database



Private Sub Report_Open(Cancel As Integer)

  Call format_fields

End Sub



Private Sub format_fields()

    Custom1.Caption = CustomData(5)

    Me.Custom1.FontSize = CustomData(9)

    Me.Custom1.ForeColor = QBColor(CustomData(10))

    Me.Custom2.Caption = CustomData(6)

    Me.Custom2.FontSize = CustomData(9)

    Me.Custom2.ForeColor = QBColor(CustomData(10))

    Me.Custom3.Caption = CustomData(7)

    Me.Custom3.FontSize = CustomData(9)

    Me.Custom3.ForeColor = QBColor(CustomData(10))

    Me.Custom4.Caption = CustomData(8)

    Me.Custom4.FontSize = CustomData(9)

    Me.Custom4.ForeColor = QBColor(CustomData(10))

End Sub

Open in new window

0
 
LVL 75
ID: 34298024
"the label is the same in all the report, "
What label ?

"and it is displaying wrong data. "
What data is it supposed to be displaying ?

0
 
LVL 6

Author Comment

by:anushahanna
ID: 34298155
>>What label ?

label of the company (just has name and address etc) and it is coming from the sub-report..

>>"and it is displaying wrong data. "

the address needs update- that is why i am trying to get to the code behind the sub-report(label)
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 125 total points
ID: 34298592
"mx, it has to be under macros or modules only, right?"
To be sure, search Forms, Reports, Macros & Modules ... Reports for sure.

mx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34299806
when i included those 4, then i get
Found String in:Reports!<ReportName>!Data Subform.SourceObject
...many more reports like that, and then finally
Found String in:Report!rpt_all_pinned_Data.Name

in modules/macros, it is not finding it..

what other logic might be used to full the header info?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34301271
SouthMod, the app is to hold data entry from what is collected in form, and get reports on the data, especially at year end..

basically, the company has moved, so all i am trying to do is put the right (new) address on the header of the reports. header info (and footer) generally is trivial- the ownership is with the person to whom this custom software was sold to, who needs me to change this..

Do you still feel this is a ownership issue?

>>why you cannot use standard means to do change data in the application

Generally, the code will be right behind the report- that is how i have always seen it.. i can see from LSM's comment in #34290421, "If you open this in Design mode, then you should be able to review the code (either manually or with F&R)." too that he also would expect to see the code for the subreport right there.

"stamped"- is this is a technical stamp through code, or a ethical one you are talking about?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34304051
SouthMod, by stamped if you meant password protection to get to design mode or the code, yes, i am using that password- the db is secured 2 levels mdw and then password for the code/design. i am through that and valid in my attempt... jfyi-
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34311306
thanks for your feedback, SouthMod.

sorry if i confused you on this point- the sw belonged to CompanyA and still does- all that has happened is that the company has moved to a different address.
example:
ee-company
SouthMod, Sr.Mod
ee-land, CA 12345

the company has moved to
ee-company
SouthMod, Sr.Mod
ee-ground, NY 67890

that's all.

this data is shown in all the reports printed, and obviously wrong, and just needs corrected.

Generally, you would be able to just go behind the subreport code and see how it is getting populated, and fix it. this is not straight forward- hence checking on the access experts.

From all of my questions, did i ever try to break anything without a password- i was only asking how to use the password I was having at hand.. yes, access with mdw is new to me.

the dev has long lost touch, and  is not able to tracked.. the good thing is we have the right passwords.. but still eluding..

so by stamped, you did not mean a technical stamp, did you?
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34387435
finally tracked where the info was being called from one of the modules.. fixed it.

Thanks for all the expert's help...

and to SouthMod also for the alertness and watchfulness..
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now