If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How does Access count characters?
When I copy text into Word and view the character count, the number is
different than what I get with Len(Trim[fieldname]). How does Access count characters? Thanks. David |
#2
|
|||
|
|||
How does Access count characters?
Could you give us a hint? Are the counts off by just one or two, or by a
lot? Do you have an example of something that Word counted and Access counted, but came up with different counts? More info, please... Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "roccogrand" wrote in message ... When I copy text into Word and view the character count, the number is different than what I get with Len(Trim[fieldname]). How does Access count characters? Thanks. David |
#3
|
|||
|
|||
How does Access count characters?
I expect that you find Word as being short as I dought that it counts
carriage returns and line feeds like Access does. -- Build a little, test a little. "roccogrand" wrote: When I copy text into Word and view the character count, the number is different than what I get with Len(Trim[fieldname]). How does Access count characters? Thanks. David |
#4
|
|||
|
|||
How does Access count characters?
Thanks for responding.
The field is a Memo field. The counter is in an unbound text box. I just entered "1" and the length is 33. Then I entered "1234567890123456789012345678901234567890" and the count is 72. "1234567890 1234567890 1234567890 1234567890" also gives 72. What am I doing wrong? David "Jeff Boyce" wrote: Could you give us a hint? Are the counts off by just one or two, or by a lot? Do you have an example of something that Word counted and Access counted, but came up with different counts? More info, please... Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "roccogrand" wrote in message ... When I copy text into Word and view the character count, the number is different than what I get with Len(Trim[fieldname]). How does Access count characters? Thanks. David . |
#5
|
|||
|
|||
How does Access count characters?
"roccogrand" wrote in message
news Thanks for responding. The field is a Memo field. The counter is in an unbound text box. I just entered "1" and the length is 33. Then I entered "1234567890123456789012345678901234567890" and the count is 72. "1234567890 1234567890 1234567890 1234567890" also gives 72. What am I doing wrong? So you "counter" text box has a controlsource like: =Len(Trim([YourMemoFieldName])) ? My guess is that your memo field has another line of text above what you see, with a line break in between. Click in the control and press Shift+F2 to open a zoom box on it, and see what's there. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#6
|
|||
|
|||
How does Access count characters?
Thanks Dirk,
There is no other text in the field, as viewed in the Zoom window. Could it be that RTF adds characters to memo fields? In one case, Word calculated 1779 with no spaces and 2098 with spaces. Access calculated 2329 for the same block of text. If the culprit is RTF then I need to count and sum all RTF formatting elements individually. Can I do that in Access? David "Dirk Goldgar" wrote: "roccogrand" wrote in message news Thanks for responding. The field is a Memo field. The counter is in an unbound text box. I just entered "1" and the length is 33. Then I entered "1234567890123456789012345678901234567890" and the count is 72. "1234567890 1234567890 1234567890 1234567890" also gives 72. What am I doing wrong? So you "counter" text box has a controlsource like: =Len(Trim([YourMemoFieldName])) ? My guess is that your memo field has another line of text above what you see, with a line break in between. Click in the control and press Shift+F2 to open a zoom box on it, and see what's there. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#7
|
|||
|
|||
How does Access count characters?
Part of the problem does appear to be related RTF. I have added a counter to
another Memo field and copied the same text into it. This memo field is set to Plain Text and the count is much closer to Word's but still not exactly the same (e.g., Access RTF field = 2565, Access Plain Text = 2097, Word = 2043). David "Dirk Goldgar" wrote: "roccogrand" wrote in message news Thanks for responding. The field is a Memo field. The counter is in an unbound text box. I just entered "1" and the length is 33. Then I entered "1234567890123456789012345678901234567890" and the count is 72. "1234567890 1234567890 1234567890 1234567890" also gives 72. What am I doing wrong? So you "counter" text box has a controlsource like: =Len(Trim([YourMemoFieldName])) ? My guess is that your memo field has another line of text above what you see, with a line break in between. Click in the control and press Shift+F2 to open a zoom box on it, and see what's there. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#8
|
|||
|
|||
How does Access count characters?
On Wed, 10 Feb 2010 11:53:01 -0800, roccogrand
wrote: Could it be that RTF adds characters to memo fields? Absolutely. The formatting "tags" are all characters as far as Access is concerned, but are "pushed to the background" as just formatting in Word. I can't think of any builtin - or even easily programmed - way to strip them out. -- John W. Vinson [MVP] |
#9
|
|||
|
|||
How does Access count characters?
On Wed, 10 Feb 2010 12:09:03 -0800, roccogrand
wrote: Part of the problem does appear to be related RTF. I have added a counter to another Memo field and copied the same text into it. This memo field is set to Plain Text and the count is much closer to Word's but still not exactly the same (e.g., Access RTF field = 2565, Access Plain Text = 2097, Word = 2043). That's probably carriage-return line-feed pairs; they'd be seen as characters in Access but as "whitespace" or formatting in Word and ignored. Could you perhaps explain the purpose of this count? What will you do with the number when you've calculated it? -- John W. Vinson [MVP] |
#10
|
|||
|
|||
How does Access count characters?
Thanks John.
I have been building a proposal database in Access and I have a side-by-side screen in the resumes module. For each person's professional experience statement I need to limit the number of characters sent to a PDF/Word document to an amount that will fit on one page of text with other information. This limitation is usually made by the client. That is, resumes cannot be more than one page. In addition to the prof experience statement, I may have three or four job descriptions. In the past I have dealt with this interactively, printing and looking to see if the text is out of bounds. If I can display the number of characters then I can hopefully eliminate the interactive step. You may ask, "Why not use MS Word for resumes?" The reason is that I have hundreds of resumes and I need to format them in multiple ways--assembling the parsed fields as required by the customer. I currently have ten templates built into the module that I use individually or I click one button and generate all of them. David "John W. Vinson" wrote: On Wed, 10 Feb 2010 12:09:03 -0800, roccogrand wrote: Part of the problem does appear to be related RTF. I have added a counter to another Memo field and copied the same text into it. This memo field is set to Plain Text and the count is much closer to Word's but still not exactly the same (e.g., Access RTF field = 2565, Access Plain Text = 2097, Word = 2043). That's probably carriage-return line-feed pairs; they'd be seen as characters in Access but as "whitespace" or formatting in Word and ignored. Could you perhaps explain the purpose of this count? What will you do with the number when you've calculated it? -- John W. Vinson [MVP] . |
|
Thread Tools | |
Display Modes | |
|
|