Results 1 to 8 of 8

Thread: [RESOLVED] VBA Access cant work with double vertical line char ASCII 186

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2021
    Posts
    4

    Resolved [RESOLVED] VBA Access cant work with double vertical line char ASCII 186

    Hi..

    I have to run a script to replace chars in access and I have problems in the VBA editor with chars.

    I want to execute:

    DoCmd.RunSQL "UPDATE DBA_abono_fp SET DBA_abono_fp.concepto_abono_fp = Replace([concepto_abono_fp],chr(0186),"""")", -1

    To replace doble vertical line "║" char with "" char. But I cant type doble vertical line char "║" in VB, when I type it on the VBA editor it changes to "". I tryed with chr() and the chr(186) code that match with "║" return in VBA the char "".... Whow can I look for "║" in VBA???

    Thanks.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,382

    Re: VBA Access cant work with double vertical line char ASCII 186

    Hi jfrubio, welcome to the forum. I'm not sure what you're asking, but if you need a character code you could look it up using the Windows Charmap.exe app. You should be able to launch it by pressing the Windows key combined with the R key. Enter "Charmap" in the dialog that appears and press Enter.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2021
    Posts
    4

    Re: VBA Access cant work with double vertical line char ASCII 186

    Hi Peter

    Thanks for your answer.

    The problem is that I cant paste the ║ char in VBA access editor, it change the ║ to "" and if I use functions like ChrW(&H2551) it dont return "║" return only "│" it appears that the vba editor of access dont have the needed symbol.

    Thanks

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2021
    Posts
    4

    Re: VBA Access cant work with double vertical line char ASCII 186

    Hi, solved....

    DoCmd.RunSQL "UPDATE DBA_abono_fp SET DBA_abono_fp.concepto_abono_fp = Replace([concepto_abono_fp],""" & ChrW(&H2551) & ""","""")", -1

    Work with this!!!

  5. #5
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,382

    Re: VBA Access cant work with double vertical line char ASCII 186

    @jfrubio: I am glad to see you have solved your issue. I was going to suggest to check which font you were using as it might be some fonts don't have the characters you need. Also, this thread should be marked as resolved using the thread tools.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2021
    Posts
    4

    Re: VBA Access cant work with double vertical line char ASCII 186

    Thanks for your help Peter!

  7. #7
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,382

    Re: [RESOLVED] VBA Access cant work with double vertical line char ASCII 186

    You're welcome.

  8. #8
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,710

    Re: [RESOLVED] VBA Access cant work with double vertical line char ASCII 186

    Since this is VBA I've moved the thread to our office section
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

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



Click Here to Expand Forum to Full Width