ASCII Character for Tab control

B

Burt

Hi,

You would really be saving me a lot of time, if someone
could tell me the ASCII Character for Tab.

Thanks in advance,

Burt
 
A

Allen Browne

In the Immediate window:
? Asc(vbTab)
9

Hopefully you're not trying to embed this in a text box in Access though.
 
B

Burt

-----Original Message-----
In the Immediate window:
? Asc(vbTab)
9

Hopefully you're not trying to embed this in a text box in Access though.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
Allen,

Thanks. No I'm not going to embed it into a text box.

Burt
 
P

PC User

I wonder if this might help. I use this code for tabs in a richtext field.
http://www.dbforums.com/t997217.html

Code:
================================================
Private Sub RichText_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
Dim strTextStart As String, strTextEnd As String, n As Integer
If KeyCode = vbKeyTab Then
KeyCode = 0
n = Me![RichText].SelStart
strTextStart = Mid(Me![RichText].Text, 1, n)
strTextEnd = Mid(Me![RichText].Text, n + 1, Len(Me![RichText].Text) - n)
Me![RichText] = strTextStart & Chr(vbKeyTab) & strTextEnd
Me![RichText].SelStart = n + 1
End If
End Sub
================================================

Good Luck,
PC
 
Top