Runtime Error 3001 Invalid Arguement

Temo98

New Member
Joined
Oct 23, 2009
Messages
45
Hey All -

I am running the below SQL via VBA in Access 2003, and I getting a runtime error 3001 invalid argue. I have doubled checked that the columns exist in both tables, as well as verified the the spelling within both tables. However I cant seem to get past the error. Any assistance you can provide would be greatly appreciated. Thanks in advance.


Code:
DoCmd.RunSQL "INSERT INTO MINOUTL_Master ( [Item Nbr], ITMST, Effective, Expire, MINOUTL, Time_Stamp ) " _
& "SELECT tbl_MINOUTL_Intermediate.[Item Nbr], tbl_MINOUTL_Intermediate.ITMST, " _
& "tbl_MINOUTL_Intermediate.Effective, " _
& "tbl_MINOUTL_Intermediate.Expire, tbl_MINOUTL_Intermediate.MINOUTL, tbl_MINOUTL_Intermediate.Time_Stamp " _
& "FROM tbl_MINOUTL_Intermediate;"
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Check to see that the Data Type of each field in your "destination" table matches exactly the field of the table you are trying to select from (your "source" table).
Also check to make sure that none of the data you are trying to paste in violates any of the rules of the table you are trying to paste it into. For example, if a field cannot be Null and one of your records has a Null value in that particular field.

You can also check to make sure that your Select query has valid syntax by checking just that part, i.e. make sure that the following code does not return any errors.
Code:
DoCmd.RunSQL "SELECT tbl_MINOUTL_Intermediate.[Item Nbr], tbl_MINOUTL_Intermediate.ITMST, " _
& "tbl_MINOUTL_Intermediate.Effective, " _
& "tbl_MINOUTL_Intermediate.Expire, tbl_MINOUTL_Intermediate.MINOUTL, tbl_MINOUTL_Intermediate.Time_Stamp " _
& "FROM tbl_MINOUTL_Intermediate;"
 
Upvote 0
Does the query execute if you try it manuall?
 
Upvote 0
Quick update...

I created a query and copied the select portion of the SQL and it ran without a hitch...So that leaves me at a loss...
 
Upvote 0
Now try creating the WHOLE query (not just the Select part) to see if you can run that manually.
If not, take a look at the things I mentioned regarding fields in my previous post.
 
Upvote 0

Forum statistics

Threads
1,221,902
Messages
6,162,724
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top