Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unanswered: Append Query cutting off text

    Hello All,

    Running Access 2002

    I'm doing a form for users to create a standard memo. The form has about 5 unbound fields, one per std. paragraph. On open, I run code that dumps in default text. The user then can edit text then save record for recall and future edits. To save, I run an append query that takes text from form and puts into a table.

    Problem: One paragraph's default text is about 525 chars. The text shows up correctly but when user saves it, the resulting record cuts off the last charactors at about 510 chars. and puts in junk. The recieving table's field is MEMO type. I've checked that there is no garbage in the prepopulated standard text (odd special chars, etc.). The problem appears in the append query step. I also see text problem even if I just view query instead of running query. I've tried moving the code to a Module, as follows, but getting same result. Any ideas why this is happening or how to fix? Is there some issue with appending more than 500 charaters to a field, even if it's a Memo field?

    Here's module code. "Para2" is the existing problem but I need to correct this for all of the "Para" fields:
    Dim strSQL As String

    'Clear table of previous activity
    strSQL = "INSERT INTO tbl_FindingsMemos ( Findings_ID, Version, Subject, [Date], [From], [To], Intro, Para1, Para2, Para3, Closing, Attachments, CreatedBy, CreatedDate )" & _
    "SELECT Forms!frm_FindingsMemo_new!Findings_ID AS FindingID, " & _
    "Forms!frm_FindingsMemo_new!Version AS Version, " & _
    "Forms!frm_FindingsMemo_new!Subject AS Subject, " & _
    "Forms!frm_FindingsMemo_new!Date AS [Date], " & _
    "Forms!frm_FindingsMemo_new!From AS [From], " & _
    "Forms!frm_FindingsMemo_new!To AS [To], " & _
    "Forms!frm_FindingsMemo_new!Intro AS Intro, " & _
    "Forms!frm_FindingsMemo_new!Para1 AS Para1, " & _
    "Forms!frm_FindingsMemo_new!Para2 AS Para2, " & _
    "Forms!frm_FindingsMemo_new!Para3 AS Para3, " & _
    "Forms!frm_FindingsMemo_new!Closing AS Closing, " & _
    "Forms!frm_FindingsMemo_new!Attachments AS Attachments, " & _
    "Forms!frm_FindingsMemo_new!CreatedBy AS CreatedBy, " & _
    "Forms!frm_FindingsMemo_new!CreatedDate AS CreatedDate;"

    DoCmd.RunSQL strSQL

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Use VALUES for single-row inserts:

    INSERT INTO yourTable (field1, field2)
    VALUES ('value for field1', 'value for field2')

    Make sure you're parsing your quotes properly too.

    To insert don't You have to pass don''t, that kind of thing.

    See if that helps.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2004
    Thanks, Teddy.
    Ultimately I added code to modify the recordset directly and that worked. I appreciate your time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts