We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Access 02 to 07 upgrade -- Reports cannot get values from list view control

Digifx
Digifx asked
on
Medium Priority
494 Views
Last Modified: 2012-06-27
Yesterday we upgraded Access2002 to Access 2007.  The reports started asking for parameters.  I figured out that it will not get values from a listview  like [Forms]!Jobs!Jobs!SelectedItem.SubItems(3).  It will get parameters from textboxes like [Forms]!Jobs!JobSearchNum
The listview is an Active-X control  --MSComctlLib.ListViewCtrl.2
I could put textboxes on the form and move the data on SelectedItemChanged but I use a lot of data directly from the form.  Is there a fix for the report to get parameters from the listview?
 thanks for any help.
Comment
Watch Question

Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:

  I haven't seen anything pop up on this.  Are you up to date on service packs for 2007?

JimD.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:

 and one other thing; the app compiles cleanly right?   Large number of issues with conversion from prior versions are caused by apps being converted in an un-compiled state.

JimD.

Author

Commented:
Yes it does compile.   Someone just told me to delete the control and place a new one.  Since it is active-x it might fix it.   I'll let you know.

Author

Commented:
deleteing the listview control and re-creating it did not help.  Also I can type =[Forms]![Jobs]![Jobs].[SelectedItem].[SubItems](3)  in the intermediate widow and it displays the correct value.  When I put this in the contol source in a report textbox it displays #Name.   I'm losing hair quickly..... please help
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:

 Make sure your using print preview of the report or print, not report view.  Lots of stuff doesn't work in Report View.

JimD.
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
Thanks for posting that.  I don't see anything wrong that you did though.

I do remember that other thread and it's in regards to form properties not being able to be read correctly.  I'll have to read it again, but at least you've found a work a round.

JimD.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
Ah, here's the kicker:

"Before Access 2007, it was possible to reference public variables and properties of loaded forms directly, without wrapping them in a function. Wondering, why was it necessary to make that impossible, thus creating "second class" public properties and variables - now you can reference native public properties of forms etc., but not the ones you created. I think this moves away from what's called "object-oriented", and wrapping every public variable in separate function is counterproductive. This applies not only to the queries, but also to the forms, for instance, to the control source of a textbox."

  An active-x control would be considered to have custom properties as it's a non-native Access control.

Author

Commented:
Changed how query references listview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.