Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove Enter Character (Access 2000)

    The Mailing address is entered in to a text field that permits pressing enter to create a new line. This works well for most of the items but I have run into a problem with a comma delimited text export. The enter character forces a new line in the export whenever the character is present. Is there a way to identify this character using the instr() function? Is there any other way around this problem?
    Please help. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remove Enter Character (Access 2000)

    The simplest way around it is to enter the address in separate fields instead of a single field.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Enter Character (Access 2000)

    Well, to use instr() it's called like this:

    <pre>intPosition = InStr(strToCheck, vbCrLf)</pre>


    intPosition will be the starting position of the vbCrLf (which is the carriage return/line feed constant)

    If you want to replace the vbCrLf then you should probably use the Replace() Function

    <pre>strIn = Replace(strIn, vbCrLf, " - ")</pre>


    That will replace the vbCrLf with ' - '

    HTH,
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  4. #4
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Enter Character (Access 2000)

    Thank you for answering. The data is already in the db and cannot be changed.

  5. #5
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Enter Character (Access 2000)

    Thanks. I think this will work. I will check it soon.

  6. #6
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Enter Character (Access 2000)

    It worked. Thank you very much.

Posting Permissions

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