Discussion:
Invalid Argument Error
(too old to reply)
Tcs
2004-08-04 14:12:56 UTC
Permalink
First, I'm not sure that I'm in the correct group. If I chose incorrectly, I
apologize, and please let me know the correct group. Thanks.

I was using my Access 2000 db with no problem yesterday. I closed it down, so
my nightly backup job wound zip it and send it across the network to my home
directory.

This morning I tried to execute my query. This is one that has given me NO
problem previously. After a while I got the "Invalid Argument" error. So I
tried to modify the query.

I modified my query and I when I went to save it, I got the "Invalid Argument"
error. I tried again. Same result. So I tried to compact and repair by db.

When I tried to compact and repair my db, I got the "Invalid Argument" error.
AGAIN. (My db has grown to about 2mb.) So I tried...AGAIN. Same result.

I closed my db then opened it. I went to my query to modify it. I was able to
add two fields to the 15 that were already there. (A simple append query to
pull data off the AS/400 and make a local table.) this time? NO problem. So I
tried to add ANOTHER two fields. This time? "Invalid Argument" error. So I
tried to Compact and Repair again. "Invalid Argument" error.

I'm also getting errors when my db refreshes the ODBC links to DB2 on the
AS/400. It gets thru a bunch, then starts erroring out. This WAS working just
fine, and I haven't changed a thing.

I'm at a loss. Does anyone have any idea what's going on? And possibly how to
fix it?

Any help is appreciated. Thanks in advance,

Tom
Ken Snell
2004-08-05 00:08:21 UTC
Permalink
Could be that the references are messed up on the PCs. If references are
messed up -- you can get that message. Or you may be using Replace in the
query in a criterion or calculated field expression?

For references, try following these steps (from a post by Douglas Steele,
MVP):

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html


For the Replace possibility, the problem with Replace is a bug that is
caused by ACCESS improperly interpreting the sixth argument which you likely
aren't specifying, as it's optional) as a language setting and not a
comparison mode. The way to avoid
this error is to always specify all six arguments of the Replace function,
even the optional ones:

MyResult = Replace("SourceString", "FindString", "ReplaceString", 1, -1, 1)
--
Ken Snell
<MS ACCESS MVP>
Post by Tcs
First, I'm not sure that I'm in the correct group. If I chose
incorrectly, I
Post by Tcs
apologize, and please let me know the correct group. Thanks.
I was using my Access 2000 db with no problem yesterday. I closed it down, so
my nightly backup job wound zip it and send it across the network to my home
directory.
This morning I tried to execute my query. This is one that has given me NO
problem previously. After a while I got the "Invalid Argument" error. So I
tried to modify the query.
I modified my query and I when I went to save it, I got the "Invalid Argument"
error. I tried again. Same result. So I tried to compact and repair by db.
When I tried to compact and repair my db, I got the "Invalid Argument" error.
AGAIN. (My db has grown to about 2mb.) So I tried...AGAIN. Same result.
I closed my db then opened it. I went to my query to modify it. I was able to
add two fields to the 15 that were already there. (A simple append query to
pull data off the AS/400 and make a local table.) this time? NO problem.
So I
Post by Tcs
tried to add ANOTHER two fields. This time? "Invalid Argument" error.
So I
Post by Tcs
tried to Compact and Repair again. "Invalid Argument" error.
I'm also getting errors when my db refreshes the ODBC links to DB2 on the
AS/400. It gets thru a bunch, then starts erroring out. This WAS working just
fine, and I haven't changed a thing.
I'm at a loss. Does anyone have any idea what's going on? And possibly how to
fix it?
Any help is appreciated. Thanks in advance,
Tom
Ernie
2004-08-09 04:37:19 UTC
Permalink
Not to doubt what Ken says below (he is far more
knowledgeable than I), you stated that your "db has grown
to about 2Mb", did you mean 2Gigabytes?

If so, then your problem is that you are trying to exceed
the maximum size of an access db. You have two choices to
correct this:

1) convert to an SQL server backend (sql server handles
much larger databases)
or
2) find any fluff in your database and get rid of it
(fluff includes embedded pictures where a link will do, or
history records going back more than 5 years (3 in some
cases)), then compact your db again.
-----Original Message-----
Could be that the references are messed up on the PCs. If
references are
messed up -- you can get that message. Or you may be
using Replace in the
query in a criterion or calculated field expression?
For references, try following these steps (from a post by
Douglas Steele,
This can be caused by differences in either the location
or file version of
certain files between the machine where the application
was developed, and
where it's being run (or the file missing completely from
the target
machine). Such differences are common when new software
is installed.
On the machine(s) where it's not working, open any code
module (or open the
Debug Window, using Ctrl-G, provided you haven't selected
the "keep debug
window on top" option). Select Tools | References from
the menu bar. Examine
all of the selected references.
If any of the selected references have "MISSING:" in
front of them, unselect
them, and back out of the dialog. If you really need the
reference(s) you
just unselected (you can tell by doing a Compile All
Modules), go back in
and reselect them.
If none have "MISSING:", select an additional reference
at random, back out
of the dialog, then go back in and unselect the reference
you just added. If
that doesn't solve the problem, try to unselect as many
of the selected
references as you can (Access may not let you unselect
them all), back out
of the dialog, then go back in and reselect the
references you just
unselected. (NOTE: write down what the references are
before you delete
them, because they'll be in a different order when you go
back in)
For far more than you could ever want to know about this
problem, check out
http://members.rogers.com/douglas.j.steele/AccessReference
Errors.html
For the Replace possibility, the problem with Replace is
a bug that is
caused by ACCESS improperly interpreting the sixth
argument which you likely
aren't specifying, as it's optional) as a language
setting and not a
comparison mode. The way to avoid
this error is to always specify all six arguments of the
Replace function,
MyResult = Replace
("SourceString", "FindString", "ReplaceString", 1, -1, 1)
--
Ken Snell
<MS ACCESS MVP>
Post by Tcs
First, I'm not sure that I'm in the correct group. If
I chose
incorrectly, I
Post by Tcs
apologize, and please let me know the correct group.
Thanks.
Post by Tcs
I was using my Access 2000 db with no problem
yesterday. I closed it
down, so
Post by Tcs
my nightly backup job wound zip it and send it across
the network to my
home
Post by Tcs
directory.
This morning I tried to execute my query. This is one
that has given me
NO
Post by Tcs
problem previously. After a while I got the "Invalid
Argument" error. So
I
Post by Tcs
tried to modify the query.
I modified my query and I when I went to save it, I got
the "Invalid
Argument"
Post by Tcs
error. I tried again. Same result. So I tried to
compact and repair by
db.
Post by Tcs
When I tried to compact and repair my db, I got
the "Invalid Argument"
error.
Post by Tcs
AGAIN. (My db has grown to about 2mb.) So I
tried...AGAIN. Same result.
Post by Tcs
I closed my db then opened it. I went to my query to
modify it. I was
able to
Post by Tcs
add two fields to the 15 that were already there. (A
simple append query
to
Post by Tcs
pull data off the AS/400 and make a local table.) this
time? NO problem.
So I
Post by Tcs
tried to add ANOTHER two fields. This time? "Invalid
Argument" error.
So I
Post by Tcs
tried to Compact and Repair again. "Invalid Argument"
error.
Post by Tcs
I'm also getting errors when my db refreshes the ODBC
links to DB2 on the
Post by Tcs
AS/400. It gets thru a bunch, then starts erroring
out. This WAS working
just
Post by Tcs
fine, and I haven't changed a thing.
I'm at a loss. Does anyone have any idea what's going
on? And possibly
how to
Post by Tcs
fix it?
Any help is appreciated. Thanks in advance,
Tom
.
Loading...