Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by scidb

  1. scidb

    How to Subscript text in a RichText Box

    Sorry, I submitted before I finished. What I need to do is subscript the numbers in red, but the number "2" in black needs to be left full size. These exceptions to the subscripting would always occur after the "•". Can you qualify a VB script regular expression to not include some things...
  2. scidb

    How to Subscript text in a RichText Box

    strongm and/or anyone that can help I have been working with you suggested code, but I am still having trouble implementing it. I want to use it in an Access Report, but there is a bug with ActiveX controls where you can't see the rich textbox content in print preview mode, so I am using a MS...
  3. scidb

    How to Subscript text in a RichText Box

    Sheco/strongm, I am still working to implement all of your suggestions and I just wanted to say thank you for your time and willingness to help!
  4. scidb

    How to Subscript text in a RichText Box

    Sheco, My rich text box name was originally rtb1, but I changed it to match strongm's code. Now my rtb name is "RichTextBox1", but I don't have anything called Text1. What is that line of code doing anyway? The line: RichTextBox1.Text = Text1.Text comes from strongm. I guess we may have to...
  5. scidb

    How to Subscript text in a RichText Box

    Sheco, It didn't give the same error message! But now I get a Microsoft Visual Basic Run-time '424'; Object required error message and the debug routine highlights the line RichTextBox1.Text = Text1.Text
  6. scidb

    How to Subscript text in a RichText Box

    the Report_Open() event did work automatically when I used the bit of code you generated, but when I use the code for the subscripting it doesn't. :(
  7. scidb

    How to Subscript text in a RichText Box

    Sheco, I am not sure what is going on. I got your code to work like a charm in the same database I have the report! I have Access 2002, but not sure if that is the problem!
  8. scidb

    How to Subscript text in a RichText Box

    Sheco, I thought I had to tell the MS Access Report to run this code explicitly. In the Properties of the MS Access Report there is an Event tab. One of the events is "On Open" and I have set that equal to my function name which is Report_Open(). I have tried to open the report without...
  9. scidb

    How to Subscript text in a RichText Box

    Hi Sheco, strongm, Current code is: Private Sub Report_Open() Dim re As RegExp Dim mymatches As MatchCollection Dim mymatch As Match richTextBox1.Text = Text1.Text Set re = New RegExp re.Global = True re.Pattern = "\w\d" Set mymatches =...
  10. scidb

    How to Subscript text in a RichText Box

    Hi strongm, I have added the reference library and added back in 'Option Explicit' and there are no longer undefined variables. How do I now get this to run? In a MS Access report, there are no buttons. I have this RTB in the detail section of the report and I have an On Format, On Print...
  11. scidb

    How to Subscript text in a RichText Box

    Hi strongm, I am getting some errors: User-defined type not defined for New RegExp removed options explicit, helped some, but still some undefined variables? Suggestions? Thanks for your time. P.S. Sheco...you must be a chemist or a good student! Pentahydrate it is.
  12. scidb

    How to Subscript text in a RichText Box

    strongm, Thanks for the code. I have placed it in my MS Access Report. How is the code activated? Does it run automatically when the report is opened? Do I need to add it to the ON FORMAT as an event procedure? Sorry for the questions, it is all new to me.
  13. scidb

    How to Subscript text in a RichText Box

    Hi johnwm, My first sticking point is how to select only numbers in the string? This is complicated a bit as I hope the following example will show. Given the [MF]= CuS04·2H2O, I only want the code to subscript numbers that DON'T appear after a "·". In this example then, after subscripting...
  14. scidb

    How to Subscript text in a RichText Box

    Thanks johnwm! I will give it a try and see what I come up with! Thanks very much for the quick response.
  15. scidb

    How to Subscript text in a RichText Box

    Hello All, I need help with a RichTextBox Control. I have an MS Access report that has a RichTextBox control. The control gets its data from a field in the database that contains chemical formulas, e.g. H2O. What I need to do is search the RichTextBox for any numbers and make them...

Part and Inventory Search

Back
Top