Results 1 to 1 of 1
2008-03-12, 19:53 #1
- Join Date
- Jan 2001
- Redcliff, Alberta, Canada
- Thanked 5 Times in 5 Posts
Report Text Controls - a workaround (Access All Ve
Here is a workaround to create a telephone list similar to the one in the screen shot below.
In my report I wanted to concatenate the first and last names, but have the last name bolded. I also wanted a leader between the name and telephone number.
The problem is that Access can't format separate words within a control.
Here is what I did:
[b]Catharine Richardson (WebGenii)
- <LI>Pick a monospace font for the report
<LI>Bolded the last name and set the control's background to transparent.
<LI>In the query that provides the data for the report, create a field called GhostName, using the following:
GhostName: String((Len([LastName]))," ") & " "
<LI>In the same query, calculated the number of dashes to fill the space between the name and phone number:
(I am assuming a 36 character width column and FullName is the First and Last Names concatenated together).
<LI>Created a string composed of the GhostName, FirstName, Dashes and Phone Number(s)
ReportName: IIf([DashLength]<=0,[GhostName] & " " & [FirstName] & " " & [Phones],[GhostName] & " " & [FirstName] & " " & String([DashLength],"-") & " " & [Phones])
<LI>Place the ReportName control on the report and sent it behind the LastName control.
WebGenii Home Page
Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile