471,310 Members | 1,127 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

character limitation on Insert statement for MS Access?

Hi,
(1) I have an access form that allows users to enter data, and when
they click a button, the OnClick code that I've written uses a SQL
INSERT statement to insert the data into the database. I come from a
web programming background, so please forgive me if there is some
better approach to use in Access to accomplish this. My problem is
that when users type in more than 512 characters (in a Memo field) and
click the button, only the first 512 chars actually make it into the
database, trailed by a couple odd characters like squares and other
funky symbols. I'm trying to find the root of this limitation so that
I can correct it. Is it a limitation of the Insert statement? Is it a
limitation of the variable size that I'm using to store the data? Is
it somewhere else? I'll post code below -

(2) As another question:
I'm also trying to find a way to programmatically do what the built in
Access Edit forms do when you move to the next record (save all fields
and move to the next record). I basically want to create a button on
the form and have the OnClick code behind it that will accomplish the
same thing. Any ideas of where I might be able to find a description
of what takes place behind the scenes when a user clicks the > to go to
the next record on the built in edit forms in Access?

Here's a portion of the code referenced in (1):

Dim Feedback ' Product_Feedback corresponds to a Memo field in the DB
Set Feedback = db1.Form_AddDissemination.AddDissemProdFeedbackTex t 'The
textbox used to collect the data

DoCmd.RunSQL ("INSERT INTO [Disseminations] ([Product_Feedback]) VALUES
([AddDissemProdFeedbackText]);")
Feedback.Value = Null

Thanks in advance!

Nov 13 '05 #1
2 3018
On 18 Jan 2005 08:28:19 -0800, te********@hotmail.com wrote:
Hi,
(1) I have an access form that allows users to enter data, and when
they click a button, the OnClick code that I've written uses a SQL
INSERT statement to insert the data into the database. I come from a
web programming background, so please forgive me if there is some
better approach to use in Access to accomplish this. My problem is
that when users type in more than 512 characters (in a Memo field) and
click the button, only the first 512 chars actually make it into the
database, trailed by a couple odd characters like squares and other
funky symbols. I'm trying to find the root of this limitation so that
I can correct it. Is it a limitation of the Insert statement? Is it a
limitation of the variable size that I'm using to store the data? Is
it somewhere else? I'll post code below -


When you need to insert Memo data into a field, the easiest way is to use a
recodset. Otherwise, you have to use the Chunk procedures which are a royal
pain in the arse.

Nov 13 '05 #2
Thanks! I just tried something else that solved my problem to part 1 -
I declared my var Feedback as a String, then used that variable in the
Insert statement. I guess whatever variable was being used when I
didn't specify the var type had some sort of limit on it.
Any ideas on part (2)?

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Bilal | last post: by
16 posts views Thread by robert | last post: by
6 posts views Thread by rn5a | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.