Hi,
So, i'm asking if a tab space is possible in an unbound textbox (Rich Text type)? I could code something to add spaces, but would prefer a more legitimate solution.
P.S. i notice tabs don't work in this forum's textbox
Thanks
Hi,
So, i'm asking if a tab space is possible in an unbound textbox (Rich Text type)? I could code something to add spaces, but would prefer a more legitimate solution.
P.S. i notice tabs don't work in this forum's textbox
Thanks
From what I've read on the subject, no. Some will key in a special character then replace it in form with the desired spacing or whatever it is they're after. The problem as I see it is, in a bona fide word processor, tab key functions so as to move to the next "tab". There may only be 2 or 3 spaces left, so the effect is random. Surely you only want to inject a set number of spaces...
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
From what I've read on the subject, no. Some will key in a special character then replace it in form with the desired spacing or whatever it is they're after. The problem as I see it is, in a bona fide word processor, tab key functions so as to move to the next "tab". There may only be 2 or 3 spaces left, so the effect is random. Surely you only want to inject a set number of spaces...
Hi Micron!
Yes i was hoping to not have to use this alternative. I guess with enough coding you could maybe write something to act as if there were tab stops so it did in fact function as a tab, rather than just a set number of spaces.
Not sure if I want to spend this development time or not! Maybe ill get bored though and try it .
Thanks for your 2 cents, ill keep the thread going for a bit to see if anyone else has a working solution.
Regards
rich text does not use tab characters but formatting codes
see this link for testing to see what codes are required and where they are placed for different formatting effects
https://www.access-programmers.co.uk...d.php?t=290820
UPDATE:
This problem came up again tonight. To simply add a tab in an unbound Rich Text formatted textbox, use the following approach:
- Set tab stop property of textbox to 'No'
Use the following code:
Code:Private Sub tbSetup_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyTab Then KeyCode = 0 SendKeys String(8, " ") ' 8 = number of spaces to 'tab' End If
Note: this obviously doesn't insert an actual tab, but simulates adding spaces with the tab key, which is good enough for my needs.
I seem to remember seeing and using a simple Space(x) (nothing to do with the rockets) function that inserted x number of spaces in a string.
https://docs.microsoft.com/en-us/off...space-function
I thought it was something someone had written but it's inbuilt.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓