Invalid procedure call or argument

S

Sandy

I am running an MS Access 2003 application managing a clinical practice with
similar front end databases containing the code on the PC of a clinician and
that of his secretary and the backend on a server to which both are linked.

One of the functions is to generate letters in Word from clinics on a
specified day. This procedure has worked without any problems for a year or
so and continues to work on the clinician's PC. However, when the secretary
activates the procedure it gets to a certain point before hanging with the
error message above.

The procedure is a long one but the block (fills fields for insertion in a
table in the word template) during which the error occurs is:

prps.Item("CopyAddress").Value = strPtCopy
prps.Item("BMI").Value = strBMI
prps.Item("DMDuration").Value = strDMDurn
prps.Item("Smoker").Value = strSmoker
prps.Item("BP").Value = strBP
prps.Item("Proteinuria").Value = strProteinuria
*prps.Item("Creatinine").Value = strCr*
prps.Item("eGFR").Value = strGFR
prps.Item("LDL").Value = strLDL
prps.Item("HbA1").Value = strHbA1

after the starred line. I cannot detect any problems in the immediate area
of the error and I would be most grateful for suggestions about how I should
go about identifying its cause. In the past this type of mystifying error has
been associated with absent references, but these are all present.

Sandy
 
S

Stuart McCall

Sandy said:
I am running an MS Access 2003 application managing a clinical practice
with
similar front end databases containing the code on the PC of a clinician
and
that of his secretary and the backend on a server to which both are
linked.

One of the functions is to generate letters in Word from clinics on a
specified day. This procedure has worked without any problems for a year
or
so and continues to work on the clinician's PC. However, when the
secretary
activates the procedure it gets to a certain point before hanging with the
error message above.

The procedure is a long one but the block (fills fields for insertion in a
table in the word template) during which the error occurs is:

prps.Item("CopyAddress").Value = strPtCopy
prps.Item("BMI").Value = strBMI
prps.Item("DMDuration").Value = strDMDurn
prps.Item("Smoker").Value = strSmoker
prps.Item("BP").Value = strBP
prps.Item("Proteinuria").Value = strProteinuria
*prps.Item("Creatinine").Value = strCr*
prps.Item("eGFR").Value = strGFR
prps.Item("LDL").Value = strLDL
prps.Item("HbA1").Value = strHbA1

after the starred line. I cannot detect any problems in the immediate area
of the error and I would be most grateful for suggestions about how I
should
go about identifying its cause. In the past this type of mystifying error
has
been associated with absent references, but these are all present.

Sandy

You could try copying the clinician's copy of the front end to the
secretary's machine. If that works, the secretary's copy is corrupt.

It's easy enough to try, and you would know one way or the other that this
is/isn't the problem, thereby getting the possibility out of the way.
 
L

Linq Adams via AccessMonster.com

When things have been running fine and suddenly stop working correctly there
are three things to look at.

You've addressed the item, missing references.

Corruption is the next thing to consider; Staurt's suggestion is an easy
diagnostic procedure to check for this.

The third thing to cosider, is what's changed about Access recently. Since
you're running ACC 2003, the question has to be asked: Has the secretary's
machine been upgraded, and I use that word loosely, to the SP3 service pack?
I ask this because this so called "upgrade" has given birth to many, many
bugs, and I suppose this could be another one.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
S

Sandy

Thanks very much to both of you. The problem responded to your first
suggestion Stuart.

Sandy
 
L

Linq Adams via AccessMonster.com

Glad it was that simple to fix! So the secretary's copy was corrupt. Since
the users each have their own frontend (multiple users sharing a single
frontend on a shared drive is a big cause of corruption) the next likely
cause of corruption is the user not shutting down Access properly. It's 4:59
on a Friday afternoon and the user simply kills the power on the PC as they
head for the door! If this problem recurs, you might want to tacfully suggest
this to the user. I spent a month trying to track down the cause of
corruption that kept popping up on different PCs; sometimes one, sometimes
another, sometimes 2 or 3 at a time. Finally stayed to work late one nite and
watched as the janitor "helpfully" hit the power button on any PCs that had
been left on by the staff at quiting time! "Don't want to waste all that
electricity!"

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
T

Tony Toews [MVP]

Linq Adams via AccessMonster.com said:
I spent a month trying to track down the cause of
corruption that kept popping up on different PCs; sometimes one, sometimes
another, sometimes 2 or 3 at a time. Finally stayed to work late one nite and
watched as the janitor "helpfully" hit the power button on any PCs that had
been left on by the staff at quiting time! "Don't want to waste all that
electricity!"

Now that's interesting. I've had clients with power failures and
never had any corruptions.

HOW TO: Detect User Idle Time or Inactivity in Access 2000 (Q210297)
http://support.microsoft.com/?kbid=210297
ACC: How to Detect User Idle Time or Inactivity (Q128814)
http://support.microsoft.com/?kbid=128814

However we found that the code which runs on the timer event must be
disabled for the programmers. Otherwise weird things start happening
when you're editing code.

Also print preview would sometimes not allow the users to run a menu
item to export the report to Excel or others. So you had to right
click on the Previewed report to get some type of internal focus back
on the report so they could then export it. This was also helped by
extending the timer to five minutes.

The downside to extending the timer to five minutes was if a person
stays in the same form and at the same control for considerable parts
of the day, ie someone doing the same inquiries, the routine didn't
realize that they had actually done something. I'll be putting in
some logic sometime to reset this timer whenever they do something in
the program.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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

Top