urgent help needed for two things

deepbreath

Registered User.
Local time
Today, 09:31
Joined
Apr 18, 2001
Messages
73
can some one plz help me with following two problems
1) how to eliminate blank spaces. e.g if i have a name field of 20 characters, and name is only 10 characters long, how to elimnate extra 10 spaces when report is printed, or can we put "*" in remaining fields
2) it is actually same with above problem, if we can remove extra fields, can we make next field move closer to previous one, i.e if name is short, next field age or other automatically adjust and moves very close to where name ends. i have tried auto grow or short, but it doesn't work

thanks in advance
 
Hi deepbreath

I agree with Rich (well, with that great name what would you expect) - but I'd like to add the following points.

If your first field is sometimes likely to be empty or blank then your field2 could start with a "leading space". Try this instead:

=([Field1]+" ")&[Field2]

FYI the Can Grow/Can Shrink properties in a report text box are there to allow the text boxes to grow/shrink in height with more information - they do not affect the width. Therefore, a text box positioned alongside another text box cannot expand (this is fine for data of a fixed length like dates, identity numbers, etc) but is less attractive for data like names (assuming the name is made up of more than one name). Usually developers concatenate text strings to make a comlete name for reports (and sometimes on forms as a display /title, rather than data entry) e.g.

=[Title] &(" "+[FirstName]) & (" "+[MiddleName])& " " & [LastName]

HTH

Rich Gorvin
 
If you really have leading or trailing blanks in your name fields (likely if your data originally comes from a non-Access source), you can use the Trim() function to get rid of them prior to concatenating the name fields.

=Trim([Title]) &(" "+Trim([FirstName])) & (" "+Trim([MiddleName]))& " " & Trim([LastName])
 
some how i can't get it right. plz tell me steps in details, where exactly to put the code, in form, or report.
 
Put it as the control source for a new text box on your report, delete all the others.
HTH
 

Users who are viewing this thread

Back
Top Bottom