Unanswered: Counting the number of characters in a field?
I have two fields: "Subject" and "Body" that each contain text strings. I need a way to add up the characters (including spaces) from each field, generate a sum of the two fields, and multiply that sum by a constant (1.50). I need to output the answer into a new text box. How do I go about doing this?
Thanks a bunch! That did exactly what I needed it to do! Now my next question:
I need to take the text from the "Subject" field and the "Body" field and combine it into 1 string separated by a hyphen (-). I need the contents of "Subject" to be bold. The reason is that these items are classified ads going into a paper. The first few words are always bold, then theres a hyphen, then the body of the ad. I need a way at the end of each week to retreive all of the ads going in that weeks paper and copy/paste them into a layout program. Up until recently, all of the ads were typed and formatted in a Word document and I copy/pasted from there. The problem is, we couldn't count lines or generate billing information from within Word. How would I go about doing this in Access? I've tried using reports to accomplish it, but I don't think I approached it correctly. Any help would be appreciated!
Combining the two TextBoxes (with a hyphen) is quite simple but you need to know know that you can not have some text bold and some text non-bold in the same textbox. Either ALL the text is bold or none of it is. The TextBox Control doesn't work that way unfortunately but a Rich TextBox can. This is a whole other kettle of fish though.
To combine the two TextBoxes use the following line of code:
I was experimenting with creating a report containing the two fields (Subject and Body) individually. I lined the two fields up next to each other and then I tried to copy/paste them into Word. The formatting was a bit buggered up, but can something along these lines work if done properly? The main problem I ran into was in trying to get the hyphen in there.