View Full Version : Looks simple: Invalid Argument ?


ListO
12-17-2008, 10:43 PM
How hard can this be? But I'm stumped.

A very simple query that should pull up fields with zero-length, to be used in cleaning up the database:

SELECT Characters.CharName, Characters.*
FROM Characters
WHERE (((Characters.CharName)=""));

Running Access 2007, I receive an 'Invalid Argument' message. Same query works with Access '97.

Any takers?

boblarson
12-17-2008, 11:00 PM
Try this instead:


SELECT Characters.*
FROM Characters
WHERE (((Characters.CharName)=''));

ListO
12-18-2008, 06:51 AM
Thanks Bob. Unfortunately, that doesn't work either. Copy-pasted code is
SELECT Characters.*
FROM Characters
WHERE (((Characters.CharName)=''));


Since this is the only argument, it should be the argument that's triggering the error. The AC2007 help says to use two double-quotes. But it don't work.

Could it be something about the table that's making this go wrong?

boblarson
12-18-2008, 03:07 PM
Have you tried this:

WHERE ((Characters.CharName=""));

Or

WHERE ((Len(Characters.CharName & "")=0));

ListO
12-18-2008, 09:42 PM
Mystery Solved!:

As usual, user error- not helped by Access error reports...

I'm just getting my big database application going in Access 2007 converted from '97. I opened the back-end and converted it. Then I opened the front-end and converted it. Worked with some hitches.

BUT I neglected to re-link the back-end to the converted tables, so front-end was still looking at '97 version tables. Unfortunately, the 'Invalid Argument' error message is not much help. After re-linking to the converted '07 tables, it's working much better.

boblarson
12-18-2008, 10:01 PM
Ah, glad to hear you got that mystery solved. I know those "mystery messages" too as I've been stumped from time to time for a while in tracking down the real culprit.