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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Argument in Query

Status
Not open for further replies.

kjclark

Technical User
Feb 25, 2002
36
US
I have make table queries set up to split the database out by seller, so I query on each seller's name. I am setting up all of the queries the exact same way, but for some of the sellers I get "invalid Argument" when trying to run the query. I check the seller's name and it is spelled correctly to grab the data - so I don't understand why some would work and some would give me this error.

Any ideas would be greatly appreciated!

Thanks!
Karla
 
Here is the SQL code:
SELECT [Field Seller Data Final].* INTO FS_Guajardo IN 'C:\Documents and Settings\u361755\Desktop\TPM Data\TPM Seller Tables.mdb'
FROM [Field Seller Data Final]
WHERE ((([Field Seller Data Final].[Field Seller Name]) Like "*guajardo*"));


Any ideas why this one wouldn't work when the other queries do work?

Thanks again for your help!
Karla
 
Karla

In the "TPM Seller Tables.mdb", do you get any "Convert" errors? They will show up in a seperate table created by Access. These will be conversion errors.

Next read the follow FAQ regarding the use of spaces in an Access object.
I take this further, and prefer not to use spacing in a file name or directory. Use of spaces is fine, it is legal, but it just adds to the complexity of SQL statements, scripts, etc.

Third, watch for data types - text into a number or date fields for example.

Fourth, divide and conquer. Try the same syntax but update an internal TEMP seller table (i.e. copy structure but not data for your orignal seller table). If it works, then look at the external database and the file name syntax. If not, focus on the select clause.

As per trouble shooting the SQL statement, it look correct - quotes and parenthesis match. Which lead me to think about differences between [Field Seller Data Final] and FS_Guajardo.

Good luck
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top