Microsoft Knowledge Base Email Alertz

(209001) - This article shows you how to print a variable-length character string. You can use this method to print a dotted line (or a line composed of the character of your choice) between two fields of variable length on a report.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 209001 - Last Review: June 29, 2004 - Revision: 2.0

ACC2000: How to Print a Variable-Length Character String

This article was previously published under Q209001
Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SUMMARY

This article shows you how to print a variable-length character string. You can use this method to print a dotted line (or a line composed of the character of your choice) between two fields of variable length on a report.

MORE INFORMATION

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

The following example demonstrates how to print a dotted line between a variable-length name field and a phone number field. To create a variable-length character string, follow these steps:
  1. Start Microsoft Access, and then open the sample database Northwind.mdb or the sample project NorthwindCS.adp.
  2. In the Database window, click Reports under Objects, and then click New.
  3. Click Design View, select the Customers table, and then click OK.
  4. Create two unbound text boxes in the detail section of the report. Modify their properties as follows so that the first text box will display the name and the dotted line, and the second text box will display the phone number.
       Text Box 1
       ----------------------------------------------
       Name: NameDotString
       ControlSource: =[Companyname] & String(88,".")
       CanGrow: No
       CanShrink: No
       Left: 0.3"
       Top: 0.08"
       Width: 2.8"
       Height: 0.17"
       FontName: Arial
       FontSize: 8
    
       Text Box 2
       -------------------
       Name: Phone
       ControlSource: Phone
       Left: 3.1"
       Top: 0.08"
       Height: 0.17"
       FontName: Arial
       FontSize: 8
    					
  5. Set the Height property of the detail section to 0.25".
  6. Preview the report. Note that the report looks as follows:
       Alfreds Futterkiste......................030-0074321
    
       Ana Trujillo Emparedados y helados.......(5) 555-4729
    
       Antonio Moreno Taqueria..................(5) 555-3932
    
       Around the Horn..........................(71) 555-8248
    					

REFERENCES

For more information about creating reports, click Microsoft Access Help on the Help menu, type create a report in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbhowto kbinfo KB209001
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate