• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

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

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.
0
Digifx
Asked:
Digifx
  • 5
  • 4
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:

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

JimD.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:

 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.
0
 
DigifxAuthor 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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
DigifxAuthor 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
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:

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

JimD.
0
 
DigifxAuthor Commented:
I fixed it... kinda.  I found http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_25192188.html      that says you can't rerefence forms from a query but you can reference functions.  I could reference text boxes but not the active-x listview.
I got the values in code and retrived the values with functions. before-- referencing listview, stopped working in 07 changed to pull from functions behind the report code
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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.
0
 
DigifxAuthor Commented:
Changed how query references listview
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now