Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Varying the width of a Report field.

Status
Not open for further replies.

Sanibel

Technical User
Nov 15, 2001
73
GB
I am using Access Reports to produce a number of letters with dates within the text. All my dates are in Long Date format so there can be a large difference in field widths between "11 May 1991" and "20 September 2008" etc. This tends to leave a lot of white space within the letters. Is there any way that I can force text to the right of a date to be shifted left to fill any of this space.

Thanks
 
Sanibel,
It sounds like you are adding the data to the body of your text?

i.e. You transaction occurred on 13 February 2008 when...

There's no equivalent to Can Grow Can Shrink for a control's width so you could.

Add the data to the control with concatenation:

Control Source: [tt]="You transaction occurred on " & Format$([Date], "dd mmmm yyyy") & " when..."[/tt]

Or you could use a 'tag' in your control and the [tt]Replace()[/tt] function in the Format event.

Control Source: [tt]="You transaction occurred on [Date%] when..."[/tt]
Format Event: [tt]MyControl.Value = Replace(MyControl.Value, "[Date%]", Format$([Date], "dd mmmm yyyy"))[/tt]

Hope this helps,
CMP


[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top