Invalid argument error with append query

  • Thread starter Thread starter Stacy
  • Start date Start date
S

Stacy

I'm entering data into an Access 2000 form. Clicking a
button on the form will pull the data off the form and run
append queries that send the data to separate Access 2000
database/s, depending upon which database checkboxes were
selected. There is a problem with the description textbox.
The field that the information in the textbox is headed to
(in the other tables) is a memo type. For some reason,
whenever there are more than 127 characters in the
textbox, I get an invalid argument error when I try to run
the append query.

I noticed that an invalid argument issue was reported and
supposedly fixed in SP 1a. I have SP3. Has anyone else
seen this? Or am I doing something wrong?
 
Stacy said:
I'm entering data into an Access 2000 form. Clicking a
button on the form will pull the data off the form and run
append queries that send the data to separate Access 2000
database/s, depending upon which database checkboxes were
selected. There is a problem with the description textbox.
The field that the information in the textbox is headed to
(in the other tables) is a memo type. For some reason,
whenever there are more than 127 characters in the
textbox, I get an invalid argument error when I try to run
the append query.
Hi Stacy,

I tried to simulate your situation in Access2000
(9.0.6926 SP-3) and could not get an error.

In one db, I created "tblAppendMemo"
ID type Autonumber PK
fMemo type memo
MemoLength type Long

In another db I created a form
with an unbound textbox "txtMemo"
and a command button "cmdAppendMemo";
and linked to "tblAppendMemo"
in other db.

Private Sub cmdAppendMemo_Click()
Dim strSQL As String

strSQL = "INSERT INTO tblAppendMemo (fMemo, MemoLength) " _
& "VALUES ('" & Me!txtMemo & "'," & Len(Me!txtMemo) & ");"
CurrentProject.Connection.Execute strSQL, dbFailOnError
End Sub

As long as my text did not contain any
single or double quotes, it always worked.

I removed "ID" (so "tblAppendMemo" was not indexed)
to see if made a difference, but still
worked without error.

Does your situation vary from the above
somehow?

Good luck,

Gary Walter
 
Back
Top