Invalid Argument Error with Append Query

S

stenz

We've been getting an Invalid Argument error whenever we try to run an append
query. We have not had this problem in the past. We have just installed the
SR-1/1a patch(es), and the DB size is only 4MB. I've tried an INSERT INTO
VALUES() statement as well as the standard SQL text that comes with the
query. We're out of ideas and would appreciate any help you can give us.

Thanks!
 
D

dcichelli

We've been getting an Invalid Argument error whenever we try to run an append
query. We have not had this problem in the past. We have just installed the
SR-1/1a patch(es), and the DB size is only 4MB. I've tried an INSERT INTO
VALUES() statement as well as the standard SQL text that comes with the
query. We're out of ideas and would appreciate any help you can give us.

Thanks!

Hi -

Can you provide some more info? Like the exact sql of the append query
as well as the field types of the table you are appending into?

Sounds like a syntax error in your append query...

Diane
 
S

stenz

Yeah, sorry, didn't think this one thru completely.

It's a standard append query to take info from a form and append to a table.
We're not using anything fancy, just a couple combo boxes, a memo field, and
adding the date automatically. The table fields are all text except for
Date/Time and Memo for the memo field.

We think the problem lies in the memo field. If we type more than 127
characters, we get the error. We've also tried a regular text box, but get
the same error after 127 characters.

BUT, none of our other append queries are effected. So we are stumped.

The append SQL is this:
INSERT INTO Calls ( ProjectID, Client, Comments, [Date], Admin, Category )
SELECT [FORMS]![Calls]![cmbProjectID] AS Expr1, [FORMS]![Calls]![cmbClient]
AS Expr2, [FORMS]![Calls]![txtComments] AS Expr3, Date() AS Expr4,
[FORMS]![Calls]![cmbAdmin] AS Expr5, [FORMS]![Calls]![cmbCategory] AS Expr6;

I've also tried a VALUES() SQL, but got the same error:
INSERT INTO Calls ( ProjectID, Client, Comments, [Date], Admin, Category )
VALUES ([FORMS]![Calls]![cmbProjectID], [FORMS]![Calls]![cmbClient],
[FORMS]![Calls]![txtComments], Date(),[FORMS]![Calls]![cmbAdmin],
[FORMS]![Calls]![cmbCategory])"

Any help we can get would be very much appreciated.
 
D

dcichelli

Yeah, sorry, didn't think this one thru completely.

It's a standard append query to take info from a form and append to a table.
We're not using anything fancy, just a couple combo boxes, a memo field, and
adding the date automatically. The table fields are all text except for
Date/Time and Memo for the memo field.

We think the problem lies in the memo field. If we type more than 127
characters, we get the error. We've also tried a regular text box, but get
the same error after 127 characters.

BUT, none of our other append queries are effected. So we are stumped.

The append SQL is this:
INSERT INTO Calls ( ProjectID, Client, Comments, [Date], Admin, Category )
SELECT [FORMS]![Calls]![cmbProjectID] AS Expr1, [FORMS]![Calls]![cmbClient]
AS Expr2, [FORMS]![Calls]![txtComments] AS Expr3, Date() AS Expr4,
[FORMS]![Calls]![cmbAdmin] AS Expr5, [FORMS]![Calls]![cmbCategory] AS Expr6;

I've also tried a VALUES() SQL, but got the same error:
INSERT INTO Calls ( ProjectID, Client, Comments, [Date], Admin, Category )
VALUES ([FORMS]![Calls]![cmbProjectID], [FORMS]![Calls]![cmbClient],
[FORMS]![Calls]![txtComments], Date(),[FORMS]![Calls]![cmbAdmin],
[FORMS]![Calls]![cmbCategory])"

Any help we can get would be very much appreciated.



Can you provide some more info? Like the exact sql of the append query
as well as the field types of the table you are appending into?
Sounds like a syntax error in your append query...
Diane- Hide quoted text -

- Show quoted text -

Hi Stenz -

I wish I had an easy answer for you - maybe some of the other experts
on this board do - but the underlying purpose of a form is to enter
data into a table.

Normally a form is created off a certain table and the data is stored
in the underlying table whenever it is entered into the form.

So, it is a little weird that you would need an append query, which I
assume is called on some event of the form, to enter data into a
table.

One issue I can see off the bat is your field [date]. The term "date"
is a reserved term in Access. It would be better to call the field
"CallDate" or something else.

Also, if you think it's the memo field, make sure the table receiving
the data input from the form is also set as a memo field.


Hope ya figure it out.

Diane
 

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

Top