2003 : Query Error Message: Invalid Argument

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I appologize of this topic was already discussed on these forums (in the
meantime i didn't see any).

I have a few Queries that are giving me an error message Invalid Argument. I
am not sure why. these queries worked fine in 2002. when i first saw the
message i thought it was a specific problem (e.g. SELECT DISTINCT
MonthName(Month([DateWorked])) & ", " & Year([DateWorked]) AS Expr1.... this
worked for me until now, but it seems that i can't choose such type of
distinct). now i am finding other issues as well. Please tell me what is goin
on here? and how i can fix these problems.
btw, no help files available.

thanks,

sam
 
Hi Sam

I have tried this expression in a query and it works with both Access 2002
and Access 2003, so I'm not sure what is causing the problem.

Is it the same MDB file you are opening with both versions, or are they
different? If they are different then it's possibly a problem with
references (does the code compile?) or perhaps you have inadvertently
declared a public function or property in your database named either
MonthName or Month or Year.

In any case, a much "cleaner" way to construct the string you require is:

Format([DateWorked], "mmmm, yyyy")

This calls only one function instead of three! You could try it instead and
see if it works.
 
Hi Graham,

Thanks for your speedy reply. I most say that minutes after i posted my
question, everything started to work. I am trying to figure out what changed.

thanks

sam

Graham Mandeno said:
Hi Sam

I have tried this expression in a query and it works with both Access 2002
and Access 2003, so I'm not sure what is causing the problem.

Is it the same MDB file you are opening with both versions, or are they
different? If they are different then it's possibly a problem with
references (does the code compile?) or perhaps you have inadvertently
declared a public function or property in your database named either
MonthName or Month or Year.

In any case, a much "cleaner" way to construct the string you require is:

Format([DateWorked], "mmmm, yyyy")

This calls only one function instead of three! You could try it instead and
see if it works.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

SAm said:
I appologize of this topic was already discussed on these forums (in the
meantime i didn't see any).

I have a few Queries that are giving me an error message Invalid Argument.
I
am not sure why. these queries worked fine in 2002. when i first saw the
message i thought it was a specific problem (e.g. SELECT DISTINCT
MonthName(Month([DateWorked])) & ", " & Year([DateWorked]) AS Expr1....
this
worked for me until now, but it seems that i can't choose such type of
distinct). now i am finding other issues as well. Please tell me what is
goin
on here? and how i can fix these problems.
btw, no help files available.

thanks,

sam
 

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


Back
Top