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
|
|||
|
|||
Fixed field characters
I am filling a bank draft field with this code in Expression Builder and
would like it to always fill with "*" to the end whether it is "TEN DOLLARS" or "FIVE THOUSAND FOUR HUNDRED AND FOURTEEN DOLLARS AND FIFTY CENTS." How can I do this without always editing the end document? =("*" & Num2Text([TB],3) & "***********************") -- Lafayette, LA |
#2
|
|||
|
|||
Fixed field characters
If it is a specific number of characters.
= Left("*" & Num2Text([TB],3) & String(100,"*"),100) That will returned a string of 100 characters. The string will start with an "*" followed by the output of Num2Text and then have as many "*" characters as are needed to return 100 characters. If you need more characters then change both 100 figures to the maximum length of the character string to be returned. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Scafidel wrote: I am filling a bank draft field with this code in Expression Builder and would like it to always fill with "*" to the end whether it is "TEN DOLLARS" or "FIVE THOUSAND FOUR HUNDRED AND FOURTEEN DOLLARS AND FIFTY CENTS." How can I do this without always editing the end document? =("*" & Num2Text([TB],3) & "***********************") |
#3
|
|||
|
|||
Fixed field characters
Thanks, John! That did it. I had to force the table to not wrap.
-- Lafayette, LA "John Spencer" wrote: If it is a specific number of characters. = Left("*" & Num2Text([TB],3) & String(100,"*"),100) That will returned a string of 100 characters. The string will start with an "*" followed by the output of Num2Text and then have as many "*" characters as are needed to return 100 characters. If you need more characters then change both 100 figures to the maximum length of the character string to be returned. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Scafidel wrote: I am filling a bank draft field with this code in Expression Builder and would like it to always fill with "*" to the end whether it is "TEN DOLLARS" or "FIVE THOUSAND FOUR HUNDRED AND FOURTEEN DOLLARS AND FIFTY CENTS." How can I do this without always editing the end document? =("*" & Num2Text([TB],3) & "***********************") . |
#4
|
|||
|
|||
Fixed field characters
On Mar 24, 2:53*pm, Daryl S wrote:
If you use a porportinal [sic] font, then I don't know how to tell the length. I like the look of a fixed-width font on a check for the parts that vary, but some might prefer proportional fonts. I think there are some API functions to determine the length of a given text string in a given proportional font. Maybe: http://www.lebans.com/autosize_textbox.htm Creating/using some .NET functions to be called by Access might be less OS version dependent if you are in an environment where the existence of the .NET framework is practically a given. James A. Fortune |
Thread Tools | |
Display Modes | |
|
|