Drill Down Link in Report (1 Viewer)

raweber

Registered User.
Local time
Today, 18:25
Joined
Jul 28, 2011
Messages
41
All right, I've been wrestling with this for most of the day...

I want to create a summary report with minimal data, and a link on each entry that will open a detailed report for just that line. (This is for Admins who will not have write priviledges to the db so they can't open forms - at least I don't think they can without folder write priviledges)

From my reading I believe Access 2007 can do this, but I cannot, for the life of me, finding anything on HOW to do it. I'm probably just searching on the wrong terms in Google, but if anyone can point me to appropriate resources, I'd be greatful.

Rob
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:25
Joined
Aug 30, 2003
Messages
36,125
Not sure that they wouldn't be able to open a form, they just wouldn't be able to edit data. Starting in 2007 you can use a report, but only in the new Report view. Print Preview is not interactive. Either way this is one technique:

http://www.baldyweb.com/wherecondition.htm
 

raweber

Registered User.
Local time
Today, 18:25
Joined
Jul 28, 2011
Messages
41
Hi, Paul,

I 've tried to implement the code on your page, but I'm running into an error that I can't pin down. Here's what I'm doing:

I've created a summary report. Next to each entry in the report I added a small image called "DrillDown" (the plus from Windows Explorer that indicates subfolders) with a Control Source of the field "numStudy" and an On-Click event. (The value of numStudy is a string, not a number.) The code is as follows:

Code:
Private Sub DrillDown_Click()
    DoCmd.OpenForm "frmDrillDown", , , "numStudy = '" & Me.DrillDown & "'"
End Sub

I think the problem is before it tries to launch the form, however (I tried a report with similar issues), because I get the same error when I just try and display the value of numStudy in a messagebox. The error is:

"Run-time error '438':

Object doesn't support this property or method"

I've done quite a bit of Google searching today but they meaning of this error seems to encompass a lot of possible problems.

Any ideas?
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:25
Joined
Aug 30, 2003
Messages
36,125
I just tested and it worked okay for me. I'm confused when you say you gave the image a control source. Unless it's something new, an image control doesn't have a control source property (I only have Access 2000 on this PC). Can you post the db here?
 

raweber

Registered User.
Local time
Today, 18:25
Joined
Jul 28, 2011
Messages
41
Well, I dropped the "+" symbol and replaced it with a Text Box displaying the Study Number, which is the search term anyway. It works now.

Thanks for all your help, Paul.

Rob
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 15:25
Joined
Aug 30, 2003
Messages
36,125
Glad you got it sorted out.
 

Users who are viewing this thread

Top Bottom