Error 2455 when setting subreport control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2002.

I have a report with a subreport. I want to change the values of certain
controls in the subreport using the main report's openargs. However, whenever
I try this, I get error 2455.

This is a report I am opening from several different forms, so I don't want
to explicitly reference any one form.
 
Will you post the code that is referencing the OpenArgs and advise which
event this code is in?
 
In the OnOpen event:

Me![PublistHeader].Report![PublistMonth] = Me.OpenArgs

I should also mention that the as well as opening the report from several
different forms, the report's subreport is also determined by these forms,
which is why I'd rather use Me! than Reports!.
 
I'm wondering if there is a timing issue here as the main report opens but
the subreport may not be ready yet. Try setting the OpenArgs to a textbox
(hidden probably, i.e. Visible = False) on the main report then in the
subreport, have the textbox there refer to the value of the textbox on the
main report.
 
Back
Top