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

    Data from Excel has Alt enter in a cell

    I am creating a report in access. one column in the record is the address. The address came from an excel document that had an alt enter in the cell. The address in the report puts the address on one line with no space between the street name and the city. Is there an easy way to put the address on the two lines like it is in excel or put a space in between the street name and city?


    Example: This is what the address looks like now:123 Miranda DrDallas, TX 76502

    I would like the address to look like either:

    123 Miranda Dr Dallas, TX 76502

    or 123 Miranda Dr
    Dallas, TX 76502
    Thanks for any help. I know I could change it in Excel first but would rather not since there is so much data already in my database.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Does the Alt+Enter show as an odd character in the Access table?

    Options:

    1. run UPDATE query on the field to replace the Excel Alt+Enter (I think is Chr(10)) with space or CrLf characters:

    UPDATE tablename SET fieldname = Replace(fieldname, Chr(10), " ")
    or
    UPDATE tablename SET fieldname = Replace(fieldname, Chr(10), Chr(13) & Chr(10))

    2. parse the address parts to separate fields, which is how that really should be in table, this could mean VBA code
    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. Importing cell notes from excel
    By timmy in forum Import/Export Data
    Replies: 1
    Last Post: 03-12-2011, 01:34 PM
  2. Export a value to specific Excel cell
    By gg80 in forum Import/Export Data
    Replies: 5
    Last Post: 07-23-2010, 01:58 PM
  3. importing a single cell from excel onto access
    By virus100 in forum Import/Export Data
    Replies: 0
    Last Post: 03-20-2010, 11:57 AM
  4. Import single cell from excel
    By zippy483 in forum Import/Export Data
    Replies: 9
    Last Post: 02-24-2010, 02:16 PM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 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