Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access changing syntax - receive invaild argument error

Status
Not open for further replies.

sjck

Technical User
Jan 14, 2004
36
US
Access changing syntax

I have the following query

SELECT [s004 - Fee Schedule most used].* INTO [Fee Schedule unique]
FROM [s004 - Fee Schedule most used] INNER JOIN (Select [myid], MAX(MaxofIPA1) as MAXIPA
from [s004 - Fee Schedule most used] Group by [myid]) AS M ON [s004 - Fee Schedule most used].myid = M.myid;

The query will save an run the first time I use the query however when I try to run it again, I receive the an invalid argument. (The when I go back into Access I have the following Query.

SELECT [s004 - Fee Schedule most used].* INTO [Fee Schedule unique]
FROM [s004 - Fee Schedule most used] INNER JOIN [Select [myid], MAX(MaxofIPA1) as MAXIPA
from [s004 - Fee Schedule most used] Group by [myid]
]. AS M ON [s004 - Fee Schedule most used].myid = M.myid;

Access is changing my “(“ to a “[“ and my “)” to “].” in my inner join statement.

What can I do to prevent this and have my query run.

Any help would be appreciated...
 
Yes it is a pain and no I know of no way round it.

It is a limitation of the QBE grid. When you move from the QBE view to the SQL view it auto generates the SQL string using the [ and ]. but when you go to view it the thing gets confused.


Its not you or your system it a global problem with Access's QBE.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top