Results 1 to 4 of 4
  1. #1
    QTT is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    2

    Lost characters when exporting reports to pdf

    Has anyone ever experienced characters being converted to weird symbols when exporting to pdf?



    Using Access 2010, I use a make-table query to generate a table. One of the fields "Notes" occasionally has hard-returns within the records. I run an update query to replace the hard return with a space:
    UPDATE Tablename SET FIELD_NAME = replace([FIELD_NAME], chr(10), chr(32));

    and another to shorten "Notes" to 255 characters and add an ellipsis at the end:
    UPDATE Tablename SET FIELD_NAME = left([FIELD_NAME],255)&"...";

    I use a set of queries to generate several reports based on this table, and a macro to export them all to pdf. When I open the files in acrobat, the "space" I created in the first update query is converted to this bizarre ?-in-a-box character. I have tried replacing the chr(32) with "..." and got the same result. I can't publish the report with these unknown characters, but don't know where they come from or how to get rid of them.

    Thanks in advance for any support.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Maybe because hard returns are actually two non-printing characters - Chr(13) & Chr(10) - Cr & Lf.

    Try: Replace([FIELD_NAME], Chr(13) & Chr(10), " ");
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    QTT is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    2
    Quote Originally Posted by June7 View Post
    Maybe because hard returns are actually two non-printing characters - Chr(13) & Chr(10) - Cr & Lf.

    Try: Replace([FIELD_NAME], Chr(13) & Chr(10), " ");
    I couldn't make this work, and couldn't figure out why. I had switched the 10 and the 13, assuming it didn't matter the order. Apparently it does. Thanks for your assistance.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Yes, order does count, sorry I did not think to comment on that. Cr usually precedes Lf. Enter key will save codes in that order.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Lost Network
    By chessico in forum Access
    Replies: 0
    Last Post: 08-11-2011, 06:10 AM
  2. Exporting Multiple PDF reports from one report
    By dssrun in forum Programming
    Replies: 0
    Last Post: 06-29-2011, 12:16 PM
  3. Chinese Characters on Reports
    By caddadd in forum Reports
    Replies: 2
    Last Post: 02-04-2010, 02:46 PM
  4. Replies: 2
    Last Post: 01-24-2010, 09:19 PM
  5. Completly lost...
    By fairytalesrcute in forum Access
    Replies: 1
    Last Post: 05-14-2009, 09:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums