Openargs in 2003 reports

D

David

In Access 2003 I am not able to use the OpenArgs method on a report,
even though help clearly states that it applies to forms and reports.
Parms = "qwert"
DoCmd.OpenReport "rptLabel", acViewPreview, , , , Parms

Private Sub Report_Open(Cancel As Integer)
Dim args As String
args = Me.OpenArgs
Me.OpenArgs is null and causes an error

In a separate problem -

Also I am not able to reference the value entered into an unbound
textbox on a subform from the VBA behind the subform.
If isnull(CopyNo) then
CopyNo is allways Null. After reading help I tried to add the ".text"
property only to get the message that it must have the focus. A
..setFocus seems to set the focus I am still not able to reference the
value.
 
A

Alex Dybenko

Hmm, just tried - works fine at me. Could it be that you misstype variable
name?
try to run it like
DoCmd.OpenReport "rptLabel", acViewPreview, , , , "qwert"

to make sure
 
M

M.L. Sco Scofield

Works just fine here too.

Does your code compile without any errors?

Also, do you have any missing references?

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
L

luckydavid

Thanks. It is comforting to know that someone is interested. It seems
the problem is unique to my installation.
I had checked references, non noted as missing but I will never know if
I have all the necessary ones. Shuffling them did not help. I always
use "Option Explicit", and compile and save before testing.
I have got around the problem by using global variables - a bit
degrading but I will privately blame MS.
David
 
M

M.L. Sco Scofield

Hard to blame Microsoft when I have 8 computers in my office, 1 laptop, and
1 at home that all work properly.

Using a global is certainly a way around the problem, but I would be *very*
concerned about your installation because there may be something else that
isn't working properly that you just haven't discovered yet.

It should be easy to find out if it's just your database that has a
corruption or if it is your Office installation.

You never mentioned if you tried using it in a totally different (not a copy
of your current) database. How about trying to use it in the Northwind
sample database on your computer? If it works there, your Office
installation is OK and you have a corrupted database. If it doesn't work in
Northwind, then you have a bad Office installation.

If it is your Office installation, my first question would be do you have
all of the updates installed, specifically Office 2003 SP1 and Jet 4.0 SP8?

Take a look at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;821593
http://support.microsoft.com/default.aspx?scid=kb;en-us;870924
http://support.microsoft.com/default.aspx?scid=kb;en-us;303528

If it is a corrupted database and not your Office installation, create a new
database and then import all of the objects from your old one. That will
frequently fix problems that compact and repair won't fix.

If you'd like a small database that the OpenArgs works in on my computer, I
can send you one to test.

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
D

david epsom dot com dot au

Hard to blame Microsoft when I have 8 computers in my office, 1 laptop,
and

Aw c'mon... Take a look at the larger picture: 'It works on my computer'
is one of the oldest excuses in the book, but it doesn't sell software :~)

(david)
 
M

M.L. Sco Scofield

But it doesn't work on my computer. It works on *10* of my computers. And
with different operating systems and configurations.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
D

david epsom dot com dot au

So it's no ones fault? Or it's the customers fault?

Neither of those responses would be helpful, constructive
ways of dealing with the problem. Nor are they more 'true'
than the original, 'private' thought: He installed MS software
on MS software with other MS software, and now it doesn't work.

I've got sympathy with both sides: I'm both a software
consumer and a software creator. And if my software
works on 99 computers (let alone 99.95!) out of 100,
then I'm going to make a commercial decision not to
support the odd one out. But I'm not going to insist
that my client shoulder all the moral responsibility
for that one failure.

(david)
 
M

M.L. Sco Scofield

David E.,

I've had great respect for your technical knowledge for as long as I've been
reading your answers.

However, this sounds like something an American would say. (I assume you are
an Aussie from the "dot au" in your name.)

"It is not *my* fault." "It has to be someone *else's* fault." We currently
have a culture of no one taking responsibility for themselves in this
country. Arrrg...

Based on the fact that I have several computers it works on, another person
in this thread said that it works on his computer, and all of my client's
computers that I've checked, (I never mentioned them before,) I find it very
difficult to blame Access or Microsoft.

Dave (the OP) never mentioned that he didn't have any non-Microsoft software
on the machine. And he never mentioned that he had run a memory test or any
other hardware tests on his computer.

Not having the machine sitting here, it's very hard to say exactly what the
problem is. It could be the hardware. Or it could be the software
installation. Or it could just be the database itself is corrupted. One way
or the other, it *is* Dave's computer and database, so it *is* his
responsibility to trouble shoot the problem or take it to someone that can.

I offered to send Dave a database with this feature working so that he can
at least rule out his database as being the problem. (He never accepted the
offer.)

It's not a matter of supporting the "odd one out" of a hundred that don't
work. It's the "odd one out" owner's responsibility to trouble shoot their
computer and get it fixed. I've had way too many "odd one out's" over the
last 20+ years. It's always been the computer (hardware or corrupted
software) in the end.

Until Dave rules out the mdb file, (my offer to send a test database still
stands,) it is his responsibility to reinstall the software, or fix the
hardware, or live with the problem.

I did a quick Google search for access report openargs. (I didn't spend a
long time.) I found a lot of people recommending using this feature. (I just
can't imagine anyone recommending a feature that has even random "know
problems.") I found a bunch of people that had problems because of miss-use.
I found no one reporting that the feature didn't work.

Although I am a big Access (and Microsoft) supporter, if you've followed my
answers around here for very long, you know that I don't hesitate to blame
Access (or Microsoft) when it *is* their problem.

Until there is at least a second person reporting that the feature is not
working, I stand firm that it is not Access' (or Microsoft's) problem. There
are just way too many people reporting that it *is* working to blame
anything other than the computer, hardware and/or software.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
D

david epsom dot com dot au

Very astute observation: although I have lived 30 years in oz, I
am still identifiably an American migrant. However, I should
warn you that most of the world, like the USA, is justifiably
proud of its indigenous culture, and saying that something
'sounds ... American' is likely to be misunderstood :~)
(I understand that in your last presidential election, one of
the candidates was described by his enemies as acting and
appearing 'French'....)

In any case, we may be closer together on this than we first
were. I don't think that anything has to be 'someone *else's*
fault': I don't use that as an excuse myself, I didn't think
that was what was meant by the original posting, and ----
I refuse to accept that as an excuse proffered for MS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top