how do i 'insert into' a memo field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is the test code;

DoCmd.RunSQL ("insert into tbl_QuoteItems (QuoteID, Note) values (1,1000);")

I get run-time error 3134. If i remove the 'Note' field which is data type
memo and remove the value the insert works fine.

Thanks for any help i can get on this...

Jim
 
I think that Note is a reserved word, Rewrite to enclose Note in square
brackets:

DoCmd.RunSQL ("insert into tbl_QuoteItems (QuoteID, [Note]) values
(1,1000);")

Graeme.
 
Well, that surprised me. I would have thought the failure was due to trying to
put a number into a text (memo) field.

I would have thought the problem would be corrected by adding text delimiters
around the 1000

DoCmd.RunSQL ("INSERT Into tbl_QuoteItems (QuoteID,[Note]) VALUES (1,'1000')"

Graeme,

That was it! You Rock!

Thanks for the help,

Jim

Graeme Richardson said:
I think that Note is a reserved word, Rewrite to enclose Note in square
brackets:

DoCmd.RunSQL ("insert into tbl_QuoteItems (QuoteID, [Note]) values
(1,1000);")

Graeme.
 
Access/Jet appears to convert on the fly so no problem

Your suggestion was my first guess, but placing quotes around field didn't
fix, so...

Graeme.
 
Back
Top