Easiest way to concatenate in text field (many buttons)

TomH

Registered User.
Local time
Today, 05:33
Joined
Nov 3, 2008
Messages
111
I attempted to search on this, but didn't find anything. THANKS for any help!

I want to be able to add modules of contract text by selecting buttons. There are about 150-200 individual text entries I need to be concerned about, and the inclusion and order varies with each contract. For example, if my text control is Text0, and I have control Button One that adds "One" to the text, I have put OnClick code on the button as follows:

Private Sub Button_One_Click()
Text0.Value = Text0 & "One"
End Sub

However, I would have to repeat this code up to 200 times for all the possible text entries, changing the "One" here to the new text for each entry. I know this has had to have been done a million times in the past in an easier fashion. Any advice is very welcome and very appreciated.
 
Sounds like a painful way to add text to me. My preference? It would be to have a table to have the text you want available and then use a SINGLE combo box to select what you want and then have a button to add that text. (you can even set the button's DEFAULT property to yes so you can hit your enter key to make it click).
 
Forgot to add - and then you also can add or delete text as needed from the table so you don't have to keep adding more buttons and code or deleting buttons and code.
 
Bob:

Thanks very much for the excellent idea. I was thinking that the text should be in a table and could be selected by some sort of title... and I like the combo box idea. Unfortunately, my internal customer here has been pretty adamant that he "Just want to be able to push a button to add the paragraphs." UGH.

Thansk again for any shortcuts.

Tom
 
Tom,

I have attached a zip file of a Db that you can look at for a couple of ideas that I had about how adding strings to create statements might work. There are many imporvements that I know can be made to this simple version, but it is the concept that I thought you might like to look at.
 

Attachments

Thanks. I took a look at it, and was able to glean a couple new ideas. I think this job will be tedious regardless, as the internal client is insisting on certain features that will require significant maintenance. I'm linking the text through an XML interface so I can update the contract wording without having to directly access the database... and provide security against ad hoc wording. THANKS.
 

Users who are viewing this thread

Back
Top Bottom