• Formatting output to word (A2k)

    Author
    Topic
    #429492

    I’m probably doing this wrong, but it seems like Access isn’t listening. Here’s my code:

    .ActiveDocument.Bookmarks(“SSN”).Select
    .Selection.Text = Right(Format((CStr(Forms!frmStudents!SSN)), “@@@ @@ @@@@”), 11)

    Here’s the result:

    @@ @@ @@@@@

    Any suggestions?

    Viewing 1 reply thread
    Author
    Replies
    • #1000399

      I figured it out. I’m guessing Access goes in order from right to left, so my information is being formatted first, then trimmed. If I add a @ to the beginning of my format (now looking like this: @@@@ @@ @@@@) it works.

    • #1000400

      Perhaps the SSN field contains @@@@@@@@@? grin

      Added: by default, strings are formatted right to left. You can use ! in the format to specify that formatting should proceed from left to right.

    Viewing 1 reply thread
    Reply To: Formatting output to word (A2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: