Help Screen

Issue: August 1995
Section: Data management
Pages: 208


Contents

Picking your data directory in Approach
Single-spacing an Access report
Changing Access text to proper case
Sorting a Paradox for Windows tabular report


Picking your data directory in Approach

Q I keep my Approach 3.0 data in a directory called e:\data. Can I make it my default directory?

- Steve Pardus, Bolingbrook, Illinois

A The secret's in Windows' Program Manager. Highlight the application icon, then select File-Properties or press <Alt>+<Enter>. In the dialogue box Working Directory field, type the path to your data directory (in your case, e:\data). Click OK. Next time, the Open dialogue box will list the e:\data files.

Single-spacing an Access report

Q How can I single-space a report in Access 2.0? I can't get anything but double- or one-and-a-half-line spacing.

- Tim Brady, Chicago

A What you can do is adjust the detail area of your report design so less space appears after each record. First select your fields and drag them up to get rid of white space at the top of the band. Next, click the Detail band and drag the bottom border of the band up to get rid of white space below. You may also need to shrink the height of your field controls.

Changing Access text to proper case

I have received a suggestion on changing an Access text field to proper case (where the first letter in each word is uppercase and the rest are lowercase) from Robert Walkenhorst via the Internet. He notes that Microsoft's sample Northwind database already has a Proper() function you can copy to your database.

To copy the function, open your database and right-click the margin or a tab of the Database window. Select Import from the pop-up menu. In the resulting dialogue box, double-click Microsoft Access. A standard Windows file-handling dialogue box opens; move to your Access-sampapps directory and double-click nwind.mdb. A third dialogue box appears; select the Object Type modules and the Objects in NWIND.MDB Utility Functions. Select Close to return to the Database window.

To convert existing text to proper case, use your new Proper() function in an update query. First, select the Query tab in the Database window and click New. Click New Query in the next window to open the Add Table window. Double-click the name of the table you want to change, then click Close to enter the Query Design window.

Once there, click the Update Query button. Drag the name of the field you want to convert into the Field row in the first column of the query grid. In the Update To row directly below, type Proper([Field Name]), where Field Name is the field to convert. When you click Run and confirm the change, Access converts the text in that field throughout the table. When you close the query, there's no need for you to save it unless you think that you might need to convert the text again.

To avoid that possibility, use Proper() in your data entry form to correct new text as it's entered. Open your form in Design mode, right-click the control for the field whose values should be in proper case, select Properties, and click After Update and then the ellipsis (...) on the same line. Choose Macro Builder and enter a name like Proper Case. In the Macro window, select Action SetValue. In the Item field box, enter [Forms]![Form Name]![Field Name], where Form Name and Field Name are the names of your orm and field. In the Expression field below Item, enter Proper([Forms]![Form Name]![Field Name]). Then close the Macro window and the Properties dialogue box.

Sorting a Paradox for Windows tabular report

Q I've designed a tabular report for listing sales amounts in Paradox 5.0 for Windows. The original table is sorted by invoice number, but I want my report sorted by customer name. I've tried adding a group band, but that gives me a separate table for each customer. What I want is one big table sorted by customer. Is this possible?

- Danielle Zale, New York

A Paradox 5.0 makes this easy. Open your report in design mode and click anywhere in the All Records band to select it. Right-click in the band but away from any fields, and choose Sort from the properties menu. In the Fields list of the resulting dialogue box, double-click the name of the field to sort by. Click OK to return to your report design. When you run the report, you'll see your records in customer order.

Celeste Robinson


These Web pages are produced by Australian PC World © 1996 IDG Communications