Heathbo Posted November 15, 2005 Posted November 15, 2005 I'm trying to figure out a way to add a calculated number of spaces before specified text in a text field. Basically what I have is a calculation field that returns a number result (5 for example). What I need is a calculation/text field that will see the result from the first field and add 5 spaces in front of the text in the field. I'm sure there is a way but I can't figure out a way to tell the computer to add 5 spaces without actually doing " ". Any help you can give will be much appreciated.
LaRetta Posted November 15, 2005 Posted November 15, 2005 Yes, you sure can. Let's assume your number field is num. And you have a text field you wish to pad. Usually the pad is leading zeros. But if you wish to use this for export (for example), padding with spaces is used quite often. Right ( " " & num ; 6 ) I hope the spaces between the quotes are obvious. There are 5. LaRetta
LaRetta Posted November 15, 2005 Posted November 15, 2005 " You are awesome!!" Uh. No. There is one very very small detail but which is extremely important here which I forgot to mention - my favorite FM foible - in the calculation box lower checkbox, "Do Not Evaluate if All Referenced Fields are Empty." If you don't uncheck this and number is blank, it won't pad. Me and this checkbox have a long-standing love/hate relationship ... L
Recommended Posts
This topic is 7046 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now