Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Location
    Lawrence, Massachusetts, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tab Character (Access XP)

    Hi All -

    I am trying to insert a horizontal tab (not a dialog box or tab control), but a tab as in what you get when you hit the TAB key on the keyboard. When I use Chr$(9) all I get is a square character, both viewing and printing. The tab spacing would occur in a concatenation. I'm using Chr$(13) & Chr$(10) for a hard line break and this works fine so the concatenation is not balking with the Chr$(x). Do I need another combination as in the line break? All the ASCII tables I can find show Chr$(9) as the code for a horizontal tab. Any help is greatly appreciated.
    Regards,
    Laura

  2. #2
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Character (Access XP)

    There are a list of miscellaneous contacts (that's what the help article i found calls them) in Access. One of them is vbTab. It says it's equivalent is chr(9).
    It may be that you need to use this rather than chr(9)
    A few others constants are:

    vbCrLf Chr(13)+Chr(10) Carriage return

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Location
    Lawrence, Massachusetts, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Character (Access XP)

    Hi, and thanks for your suggestion.
    Alas I am using the expression builder so when I type in vbTab, Access automatically puts square brackets around it and I get a parameter prompt when I run the report. I've tried using Chr(9) and Chr$(9) and I even tried the old standby of rebooting! To no avail, I still get a square character instead of the tab spacing. If all else fails, I'll just use the Space function.
    Regards,
    Laura

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

    Re: Tab Character (Access XP)

    Those are vbKey constants, not contacts. Each one represents an ASCII character producted by pressing a non-printing key.
    Charlotte

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

    Re: Tab Character (Access XP)

    Where are you doing the concatenation? If you are trying to create an expression as the control source for a control, concatenating the tab will always produce a square, which represents a non-printing character. The keys can be concatenated in code without this problem.
    Charlotte

Posting Permissions

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