Complile question

  • Thread starter Thread starter Becky
  • Start date Start date
B

Becky

hello to all

To fight bloat (my db, NOT ME), I followed advice of others in this forum
and created a new database, then imported all tables, queries, forms, etc.
All seemed to go well, but the new db would not compile at first. The
compile error I got in in several places was...

Compile Error - Named Argument not found

In each case, the offending code line involved an OpenArgs. A typical line
that produced the error was ... DoCmd.OpenReport strDoc, lngView, OpenArgs:=
OpAr

When I remmed out these lines involving OpenArgs, compiling worked OK.
After I unremmed the lines, compiling worked just fine. Any idea what's
going on here?
 
OpenArgs is a form argument, not a report one. My guess is that someone
saved a form as a report and didn't fix the code.
 
Arvin said:
OpenArgs is a form argument, not a report one. My guess is that
someone saved a form as a report and didn't fix the code.

It was introduced to the OpenReport method, I think it was in the
2002 version (XP), together with a WindowMode arguement.
 
RoyVidar said:
It was introduced to the OpenReport method, I think it was in the
2002 version (XP), together with a WindowMode arguement.

Must be later, I'm using 2002 to answer these questions.
 
Douglas said:
It's in 2003.

I'm reasonably sure I used OpenArgs on reports in the 2002 (XP), but
I can't confirm it at present, as I don't have that version installed
on any of my computers. However, a quick search, seems to indicate
I'm not the only one thinking it was available starting with the
2002 version.

If this is of importance for some (it's not for me, as my apps need
to work for 2000 through 2007 versions, so I can't use it anyway),
could you perhaps check again?

Watch for linebreaks in the links.

Allen Browne
"Access 2002 and later only: Open the Products by Category report in
design view. Add a text box to the Report Header section, and set its
Control Source property to:
=[Report].[OpenArgs]
The code builds a description of the filter, and passes it with
OpenArgs. See note 4 for earlier versions."

http://allenbrowne.com/ser-50.html

"If you are using Access 2002 or later, you could pass the name of
the form in the OpenArgs of OpenReport. Then in Report_Close you can
show the form with:
Forms(Me.OpenArgs).SetFocus"

http://groups.google.com/group/microsoft.public.access.reports/msg/a759d540079d301b

Ken Snell
"OpenArgs works for reports in ACCESS 2002 and 2003; it won't work in
ACCESS
97 and 2000."

http://groups.google.com/group/microsoft.public.access.reports/msg/23624c1b9474386d

"OpenArgs is available for reports only in ACCESS 2002 and 2003. It's
not available in 2000. "
http://groups.google.com/group/microsoft.public.access.reports/msg/37b6766990d3d83f

Marshall Barton
"OpenArgs for reports is new in A2002."
http://groups.google.com/group/microsoft.public.access.reports/msg/662ae764e3b3631b
 
RoyVidar said:
I'm reasonably sure I used OpenArgs on reports in the 2002 (XP), but
I can't confirm it at present, as I don't have that version installed
on any of my computers. However, a quick search, seems to indicate
I'm not the only one thinking it was available starting with the
2002 version.

If this is of importance for some (it's not for me, as my apps need
to work for 2000 through 2007 versions, so I can't use it anyway),
could you perhaps check again?

Sorry, Roy: I wasn't arguing that it wasn't in Access 2002: I was simply
confirming that it was in Access 2003.

Like you, I don't have Access 2002 installed on this machine.
 
I just built a report in 2002, and OpenArgs does work. It isn't in the help
files though, so I never bothered going further.
 
Back
Top