• No results found

OVERVIEW...3. Access...3 Database...3 Table...3 Record...4 Field...4

N/A
N/A
Protected

Academic year: 2021

Share "OVERVIEW...3. Access...3 Database...3 Table...3 Record...4 Field...4"

Copied!
40
0
0

Loading.... (view fulltext now)

Full text

(1)

OVERVIEW ...3 Access ...3 Database...3 Table ...3 Record ...4 Field ...4

UWCMS Table Overview ...4

Basic data tables...4

Definition Tables...4

Lookup Tables ...5

Basic transaction tables ...5

Processed Tables ...5

Other Tables...6

QUERIES ...7

Select Queries ...7

Joining Tables in a Query...9

Setting join properties: ...10

Totals Function in Queries ...11

Calculate a sum, average, count, or other totals in a query...11

More Help for Working with Queries...13

Expressions ...13 Useful Information: ...13 Operators/Criteria Setting ...13 Action Queries...16 Update Query: ...16 Delete query...16 Append query ...17 Make-table query ...19 REPORT BUILDING: ...22

Layout and Field Selection ...22

Sorting and Grouping...23

Text Fields, Labels, Summary Fields ...24

Creating a total field...25

Headings/Labels ...26

Inserting date and page number fields...27

Add a line...27

‘Stringing’ fields ...28

Other tips and information:...29

Primary Queries ...29

(2)

MAIL MERGE: ...32

Selecting Records...32

Set up your Merge document, Form Letters...32

Labels...34

Creating Labels in Microsoft Word (beginning in Access)...35

Setting Up Merges in WORD (beginning in Word) ...36

(3)

O

VERVIEW

Access DATABASE

A collection of data related to a particular topic or purpose. A database can contain tables, queries, reports, and macros. In UWCMS, the database containing the campaign data is named scms95.mdb (in general).

TABLE

In Microsoft Access, a table is an object that stores data in records (rows) and fields (columns). The data is usually about a particular category of things, such as organizations, transactions, addresses, etc. Tables are the ‘files’ holding all of your systems data. (See UWCMS File Layout with Type)

(4)

RECORD

A collection of data about a company, person, a transaction, or some other item. A record is represented as a row in Datasheet view of a table, query.

FIELD

An element of a table that contains a specific item of information, such as last name, organization ID, campaign year. A field is represented by a column or cell in a datasheet.

The table is the basic building block in Access and Access is the backbone of UWCMS. Data entered by the user into UWCMS is written to the appropriate table(s) in Access. This data can then be used to pinpoint more specific information by using the query function.

UWCMS Table Overview Basic data tables

Tables that require little more than typing in the data through UWCMS T_Addresses T_Agency T_BillingInfo T_Employees T_Firms T_Notes T_ObjectFacts T_ObjectRoles T_People T_Phones T_Salutes Definition Tables

(5)

T_CampType T_Facts T_NCCCodes T_RoleLookup T_SICCodes LOOKUP TABLES

Database utility tables that provide for consistent data entry since the user must select from a list of options, rather than typing in their own. (Rarely if ever used for reporting purposes)

T_AddressUseLookup T_AddressZoneLookup T_CampDesigLookup T_EthnicLookup T_FactLookup T_ObjectLookup T_PhoneLookup T_SalutLookup T_StateLookup

BASIC TRANSACTION TABLES

Where raw data is entered by user and stored before, during and after posting. T_BillAdjust T_BillingWorkFile T_CashReceipts T_Donors T_Pledges T_PledgeDesignations

In the case of pledges, not all pledges subsequently create a transaction record (for billing accuracy and campaign processing reasons), so if there are questions about pledges, this data is contained in the T_Pledges table, exactly as it was originally entered.

PROCESSED TABLES

Tables in which the data can only be created and modified during posting process

T_AgencyXRef (created in Agency/Add’l Information/Designation Information. Modified through Designation posting)

T_Campaigns T_Transactions T_BillAdjusts T_BillingWorkFile T _CashReceipts T_Pledges

T_T

RANSACTIONS

T_C

AMPAIGNS

T_P

RI

S

TRUCT

(6)

OTHER TABLES

There are many other tables that do not fall into any of the above categories or are a combination of several table types.

T_PriStruct is a combination. It is a Definition Table (it will define 01 01 as Major Employers, for example), but it is also a Processed Table that receives posted pledge information.

T_Resources and T_Objects are similar in some respects to the processed tables, as records are created or modified by another process. However, they differ from processed tables because (in most cases) posting of transactions is not required .

When a person, firm or agency is created, a record for that object is created in T_Objects. T_Resources receives its data from a variety of sources, including T_pledges,

T_people,T_defaults (for leadership threshold amounts), and T_PledgeDesignations.

T_Defaults holds any default information such as current campaign year, Billing Cycle and Leadership thresholds, as well as definitions for fields such as Donor Services, pledge type codes, and the names of each structure level (structure 1 is Division, structure 2 is Team, etc.)

T_ConvertOrder and T_DataportOptions are not data tables and are not used for any campaign reporting.

(7)

Q

UERIES

Select Queries

A select query asks a question (or several questions) about the data stored in your tables and returns the results in the form of a datasheet. Once the results are displayed, you can view and, in some cases, make changes to the data in the underlying tables.

For example, the table T_Campaigns contains all of campaign data your system stores. If you wanted to display only those campaign records from the 2000 campaign, a query will allow you to specify those records.

In design view, the top half of the screen displays the table(s) used for that query**. Inside the table windows are the fields that are contained in that table. Those are the fields that are available to you in your query.

The bottom half of the screen (the columns) represents the fields that are being used for the query. These fields indicate which fields will be shown and/or which fields the query is using to select by. You may add a field to the query selection by double clicking that field in the table window. You may delete a field by highlighting the column and pressing your delete key.

The top line of the column indicates the name of the field The second line indicates which table this field came from. The third line indicates whether the query will use this field to sort by. The fourth line contains a checkbox. This indicates whether the field will ‘show’ on your query. That is, when you view the records, will this field be visible. The fifth line on can be used for selection criteria.

For example, in the column for CampaignYear, from the table T_Campaigns, the criteria line shows “2000’ This tells the query to select only those campaign records for the year 2000.

(8)

**For simplicities sake, we will refer to information on the top half of the screen as Tables. However, you can (and, in most instances, will) use queries as well as tables.

You may select as many fields as you like for your query. Simply double click the field in the table window and the field will appear at the end of your column list (use the horizontal scroll bar to view the fields in your query).

(9)

A query can be built from multiple tables. In fact, most queries using UWCMS table data will need more than one table to be truly useful. For example, if you wanted all of the campaign records from the 2000 campaign and you also wanted to show an organization name, you would need to use two tables: T_Firms and T_Campaigns. You can add additional tables by selecting Query/Show Tables, selecting and adding one or more tables to a query. When two or more tables are used in a query, a Join must be created.

JOINING TABLES IN A QUERY

Association between a field in one table and a field of the same data type in another table. A join tells Microsoft Access how data from two different tables is related. In other words, what is the field that indicates that the information in the first table goes with the information in the second table. How does Access know that the campaign information it has selected is the ABC Company campaign information?

Understanding how tables relate to one another and what the appropriate linkages are is arguably 90% of learning how to create and modify your own queries and reports.

Every person or organization (company or agency) is an object within UWCMS and is listed in the T_Objects table. In most cases, tables and queries link from ObjectID to ObjectID. However, that object ID may have a different name from table to table. In the case where an object is identified by its own singular number, the field will generally be named ObjectID. However, there are tables in which an organization and a person can share a single record. In general, these are found in the basic transaction tables as well as the processed tables (excluding T_AgencyXRef which contains only agency information)

A campaign record can be for a person, an organization, or a person within an organization. Therefore, the fields are broken out as OrgID and IndividualID. These are both the object ID that would be found for the person or company, but renamed in this table to avoid confusion. A table cannot have two fields with the same name.

There are other cases that are identified by the organization as well as the individual. Such as T_ObjectRoles where the company is the object (ObjectID)to which the person (ContactID) is attached. Also, T_Employees, where the employee (or person) is the object (ObjectID) attached to the company (EmployerID). Both ContactID and EmployerID are different names for the ObjectID being linked. Again, a table cannot have two fields with the same name but both objects must be identified.

(10)

However, it isn’t always that simple. One to one links are rare. In a relational database, one object may have multiple records in another table. One person may have three addresses. Or perhaps, no address at all. A one to one link asks the query to provide you with the records where the

corresponding information is found in all tables. So, in a one to one link between T_People and T_Addresses, if a person has no address, they will not appear on your list. You will compensate for this by modifying the join property between the tables.

Setting join properties:

Sometimes you need all of a particular table whether they have a corresponding record in the

secondary table or not. For example, if you needed ALL of your companies to show whether they had a campaign record or not, you can change your join property.

In order to modify your join property, select the join (the line that connects the tables) then go to View/Join Properties.

Select the option that will allow you to see all of the records you want. For example, in our case you would select Option 2 “Include all records from T_Firms and only those records from T_Campaigns where the joined fields are equal.”

(11)

TOTALS FUNCTION IN QUERIES

You can calculate all types of totals using the Total row in the query design grid, where you select the aggregate function for the calculation you want to perform on a field.

In the query design grid, you can also specify criteria to limit the groups for which totals are

calculated, limit the records included in the calculation, or limit the results that are displayed after the calculation is performed.

Using the options in the Total row in the design grid, you can perform the calculation on groups of records and calculate a sum, average, count, or other type of total on the calculated field.

Note: The totals functions won't include records containing blank (Null) values in their calculations.

For example, the Count function returns a count of all the records without Null values.

CALCULATE A SUM, AVERAGE, COUNT, OR OTHER TOTALS IN A QUERY

1. Create a select query in Design view. Add the tables whose records you want to use in the calculation, and then add the fields on which you want to perform calculations and specify criteria.

2. Click Totals on the toolbar. Microsoft Access displays the Total row in the design grid. 3. For each field in the design grid, click its cell in the Total row, and then click one of the

following aggregate functions: Sum, Avg, Min, Max, Count, StDev, or Var. (See below for information on each aggregate function)

4. Enter criteria to affect the records selected for calculation. 5. Sort the results (if necessary).

6. Click View on the toolbar to view the results.

Note: When you use an aggregate function on a field, Microsoft Access combines the function and the field names to name the field in the datasheet (for example, AvgOfFreight). If you add a

calculated field that includes one or more aggregate functions to a query in which you're calculating totals on all the records, you must set the calculated field's Total cell to Expression.

Select To find the Use with these field data types

Sum Total of the values in a field. Number, Currency, and AutoNumber Avg Average of the values in a field. Number, Date/Time, Currency, and

AutoNumber

Min Lowest value in a field. Text, Number, Date/Time, Currency, and AutoNumber

Max Highest value in a field. Text, Number, Date/Time, Currency, and AutoNumber

(12)

Select To find the Use with these field data types

Count Number of values in a field, not

counting Null (blank) values.

Text, Memo, Number, Date/Time, Currency, AutoNumber, Yes/No

StDev Standard deviation of the values

in a field.

Number, Date/Time, Currency, and AutoNumber Var Variance of the values in a field. Number, Date/Time, Currency, and AutoNumber Group By Define the groups you want to perform the calculations for. For example, to show

total pledges by person or organization, select Group By for the ObjectID field. Expression Create a calculated field that includes an aggregate function in its expression.

Usually, you create a calculated field when you want to use multiple functions in an expression.

Where Specify criteria for a field you aren't using to define groupings. If you select this option for a field, Microsoft Access will hide the field in the query results by clearing the Show check box.

First First instance of a record for a group

(13)

More Help for Working with Queries EXPRESSIONS

Occassionally, you may need to calculate fields that don’t already exist in one of your tables. You will need to create (or ‘build’) that calculated field. A calculated field is a field defined in a query that displays the result of an expression (or equation) rather than stored data. For example, if you wanted to see the difference in dollars between two campaign years, you might create the calculated field:

= ( [ p l e d ge a u d i te d] - [ l a s t ye a r c a rd va l ue ] )

(The ‘=’ indicates the beginning of an expression or equation.) The equation is simply PledgeAudited minus last year card value.

In other cases, you may need your query to do one thing in a particular situation, but something else in another or Set a Condition. In a situation like this, you would create an ‘if statement’. For example, if you wanted to see the pledge if the Campaign Subtype was ‘CG’, but you wanted the query to show $0 if the Campaign Subtype not equal to ‘CG’, you might type in the Field line:

= i i f ( [c a m pa i g ns ub t yp e ] = ’ C G ’ , [ pl e d g e a u di te d ], 0 )

Broken down, this means: Begin expression (=) If (iif( ) the campaign subtype is (=) CG, show the pledge audited field. If not(,) show the number 0. End expression () )

Expression building may seem confusing, but it can be a very useful tool.

TIP: When building an expression, if you right click on the field line and select Zoom, a window will appear where you can see your entire expression as you type it. Or you can select Build for a window to assist you in creating your expression.

USEFUL INFORMATION:

Null value: A value that indicates missing data in a field. You can use Null values in expressions. Null values can be entered in fields for which information not present. A null field is not the same as a field that contains a zero-length string (" ") or a field with a value of 0.

For example, in our query we are selecting all organizations in our T_Firms table, but not all of the firms have a campaign record. If no campaign record exists for that organization, the value is null. If a campaign record does exist for that firm, but the fields are empty, that is a zero-length string (‘ ‘). You cannot always tell by looking at a query whether the field is null or empty, but you can set criteria for both: Is not null or <>’ ‘

OPERATORS/CRITERIA SETTING

= equal to

> Less than

>= Less than or equal to

< Greater than

<= Greater than or equal to

<> Not equal to

Between Between two values Example: pristruct1 between ‘01’ and ‘05’ The result will include the starting and ending value. ‘01’ and ‘05’ will be selected.

Like The result would contain the character(s)

If your wanted to query all notes that were related to campaign, in your query, you might select Subject like * campaign*. The asterisks are the ‘wild card’ characters. By using the asterisks at the beginning and end, the query will select all notes where the subject line contains the word Campaign. If the asterisk only appears at the beginning (Like *campaign), the query will select only those notes that end with the word Campaign. Likewise, if the asterisk is at the end, (Like campaign *), the query will select only those notes where the subject begins with the word Campaign.

(14)

Other criteria selection

Prompts: In some queries, you will want the flexibility to set the criteria each time you run the query. For example, you may want to choose the Campaign year or the Primary Structure each time you run the query. In order to do that, you will want to set up prompts. When the query runs, the prompt will appear in a parameter box that you type into. To set up your query for prompts, in design view you will find the field you want to select for, then type the prompt in the criteria line within box brackets. For example, [Campaign Year] or [Specify structure 1] or whatever the field requires.

TIP: If you are using more than one table and you need to specify the same field in each table, word your prompts identically in order to avoid multiple prompts. For example, if you need to specify the campaign year in more than one table, type the same prompt in each [Specify Year]. If you use two different phrases for each, [Specify Year] and [Campaign Year], the query will ask both questions. If you use the same phrase, the query will fill in the same value for both prompts.

True/False: In a field that uses a checkbox, true or false is the selection criteria. A check indicates True and an empty box indicates False. (a shadowed empty box is a null) Use your file layout to identify True False fields.

TIP: When creating a query, DeleteCode should almost always be equal to false. The only

exceptions are tables that are posted; T_Pledges, T_CashReceipts, T_BillAdjust and T_BillingWorkFile.

You can use one field from a query to select for another. For example, if you want all campaign

records where PledgeAudited (current pledge) is greater than LastYearCardValue (last year’s pledge). On the PledgeAudited criteria line type: >[lastyearcardvalue]

Multiple Values: If your query will seek multiple values, you can link each criteria with the word ‘OR’. For example, if you needed to select a series of Primary Structures that are not sequential, you can type a list linked by ‘or’. eg: ‘02’ or ‘07’ or ‘10’.

(15)

You may notice that there is a line beneath the criteria line that has or: beside it. This option can be used if you need different criteria for each line. For instance, if you need all EG records for primary structure ‘02’ in 1999 OR All IG records for primary structure ‘06’ in 2000, you would set the first criteria in line one, and the second on the OR: line.

TIP: When using the OR line, make sure you are careful about your selection criteria. When the

query goes through your data and pulls the information for the criteria group, it starts from scratch for the second criteria line. That is, the conditions from the first line are no longer used. If on the first line, you specify DeleteCode as False and Status as Active, you must specify that same information on your Or: line, otherwise deleted and inactive records will be pulled (because you didn’t tell it not to!)

(16)

Action Queries

An action query is a query that makes changes to many records in just one operation. There are four types of action queries: delete, update, append, and make-table.

You must exercise extreme caution when using any Action Query. There is no Undo function. Do not proceed with any action query without a backup of your data. Also, View the changes frequently to ensure that you are modifying the correct records.

UPDATE QUERY:

Makes global changes to a group of records in one or more tables. With an update query, you can change data in existing tables. For example, if you wanted to update all of your CEOs to your current Campaign Year.

1. Create a query, selecting the tables that include the records you want to update and the fields you want to use for setting criteria.

2. In query Design view, click the arrow next to Query Type on the toolbar, and then click Update Query.

3. Drag from the field list to the query design grid the fields you want to update or you want to specify criteria for.

4. In the Criteria cell, specify the criteria if necessary.

5. In the Update To cell for the fields you want to update, type the expression or value you want to use to change the fields.

6. To see a list of the records that will be updated, click View on the toolbar. This list won't show the new values. To return to query Design view, click View on the toolbar again. Make any changes you want in Design view.

7. Click Run on the toolbar to update the records.

2

3

5

(17)

Deletes a group of records from one or more tables. For example, you could use a delete query to remove CEO’s from a specified year or earlier. With delete queries, you always delete entire records, not just selected fields within records.

1. Create a query, selecting the tables that hold the records you want to delete and the fields you want to use for setting criteria.

2. In query Design view, click the arrow next to Query Type on the toolbar, and then click Delete Query.

3. Drag from the field list to the query design grid the fields you want to specify criteria for. 4. In the Criteria cell, specify the criteria for deletion.

5. To see a list of the records that will be deleted, click View on the toolbar. To return to query Design view, click View on the toolbar again. Make any changes you want in Design view. 6. Click Run on the toolbar to update the records.

APPEND QUERY

Adds a group of records from one or more tables to the end of one or more tables. For example, suppose that you acquire some volunteers and a database containing a table of information on those volunteers. To avoid typing all this information in, you'd like to append it to your T_People table. Append queries are also helpful for:

Appending fields based on criteria. For example, you might want to append only the names of volunteers with a specific structure.

Appending records when some of the fields in one table don't exist in the other table. Suppose that you want to append records from another table that has fields that match 9 of the 11 fields in the T_People table. An append query will append the data in the matching fields and ignore the others.

1. Create a query that contains the table whose records you want to append to another table. 2. In query Design view, click the arrow next to Query Type on the toolbar, and then click

Append. The Append dialog box appears.

3. In the Table Name box, enter the name of the table you want to append records to.

2

4 5

(18)

4. Click Current Database if the table is in the currently open database. Or click Another Database and type the name of the database where the table is stored. Type the path if necessary. You can also enter a connection string to an SQL database. Click OK.

5. Drag from the field list to the query design grid the fields you want to append and any fields you want to use for setting criteria. Also, you may or may not want to add the primary key field if it has an AutoNumber data type.

If all the fields in both tables have the same names, you can just drag the asterisk (*) to the query design grid. However, if you're working in a database replica, you'll need to add all the fields instead.

6. If the fields you've selected have the same name in both tables, Microsoft Access

automatically fills the matching name in the Append To row. If the fields in the two tables don't have the same name, in the Append To row, enter the names of the fields in the table you're appending to.

7. In the Criteria cell for the fields that you have dragged to the grid, type the criteria on which additions will be made.

8. To preview the records that the query will append, click View on the toolbar. To return to query Design view, click View on the toolbar again. Make any changes you want in Design view.

9. Click Run on the toolbar to add the records.

(19)

WARNING: Before appending records to existing UWCMS tables, you must understand that there are

required fields in each table. The data to be imported MUST contain certain corresponding fields or the append will fail. (The required fields vary from table to table.) Additionally, if importing data from an outside source, your UWCMS object IDs will likely not be found in the data to be appended and as a result, will be ‘orphaned’ and unusable in your database. For this reason, we highly recommend contact UWCMS support personnel for assistance if you have a need to append data to existing UWCMS tables.

MAKE-TABLE QUERY

Creates a new table from all or part of the data in one or more tables. Make-table queries are helpful for:

Creating a table to export to other Microsoft Access databases. For example, you might want to create a table that contains Leadership Giving data (using multiple tables), and then export that table to a database used by your campaign department.

Creating table that contains data from a specified point in time. For example, suppose you want to display data on 15-May-02 where all pledges based on the data that was in the underlying tables as of 9:00 A.M. on 1-Apr-02. A table based on a query extracts the most up-to-date data from the tables (the pledges as of 15-May-02), rather than the records as of a specific date and time. To preserve the data exactly as it was at 9:00 A.M. on 1-Apr-02, create a make-table query at that point in time to retrieve the records you need and store them in a new table. Then use this table, rather than a query, as the basis for subsequent reports or queries.

Making a backup copy of a table.

Creating a history table that contains old records. For example, you could create a table that stores all your transaction records prior to 1998 before deleting them from your T_Transaction table.

Improving performance of forms, reports, and queries based on multiple-table queries or SQL statements. For example, suppose you want to print multiple reports that are based on a five-table query that includes totals. You may be able to speed things up by first creating a make-table query that retrieves the records you need and stores them in one make-table. Then you can base the reports on this table or specify the table in an SQL statement as the record source for a report, or query, so you don't have to rerun the query for each report. However, the data in the table is frozen at the time you run the make-table query

1. Create a query, selecting the tables or queries that contain the records you want to put in the new table.

(20)

2. In query Design view, click the arrow next to Query Type on the toolbar, and then click Make Table. The Make Table dialog box appears.

3. In the Table Name box, enter the name of the table you want to create or replace. 4. Click Current Database to put the new table in the currently open database. Or click

Another Database and type the name of the database you want to put the new table in. Type the path if necessary. Click OK

5. Drag from the field list to the query design grid the fields you want in the new table. 6. In the Criteria cell for the fields that you've dragged to the grid, type the criteria.

(21)

7. To preview the new table before you create it, click View on the toolbar. To return to query Design view and make changes or run the query, click View on the toolbar. 8. To create the new table, click Run on the toolbar.

5 7

(22)

R

EPORT

B

UILDING

:

After building your query, now you will want to create a report. A query will show you the data in a spreadsheet format. This may be useful in some situations, but in most cases you will want an attractive format to display your information.

In Reports, to create a new report, select New. A dialog box will show you the types of reports you can create and the query list from which to select your information. Select design view and the query you wish to work with.

(23)

You can also modify your workspace. Decide whether your report layout should be portrait or

landscape. Go into File/Page Setup and modify layout and margins. You can then expand your ‘grid’ to match by dragging it out from the right.

☺ TIP: Remember your page size and margins when expanding your grid. If your report is landscape with ½ inch margins, your grid can be no wider than 10. (11 inch paper minus ½ + ½ = 10.) or you will have blank pages. If it is portrait with 1 inch margins, it can be no wider than 6 ½ inches. (8 ½ minus 1 + 1 =6.5)

Select your fields and drag them down to your grid. Place the information into the Detail section. (You can delete the ‘name’ boxes, aka Labels, by simply selecting and deleting. Don’t delete the fields, just the attached labels.)

Move your fields by selecting the field, then placing your cursor over the field until a little hand shows. You can then drag the field to any location on your grid. You can expand (or shrink) your field by selecting the field, then placing your cursor over the field until an arrow shows. That will allow you to resize your field. You can resize for height or length.

Sorting and Grouping

In most cases, you will want to establish the order in which your records will print. In other cases, you may need to subtotal based on this sorting level. That is where you will set up your sorting and grouping. Select View/Sorting and Grouping

(24)

This is where you will establish the sorting and/or group of your report. To establish a sort without a group, select the field or fields you wish to sort on and the sort order. (In most cases, the order will be ascending, but oftentimes in the case of pledge amounts or campaign totals, the sort will be

descending) Once you have established your sorts, you can close the box and continue. However, if you wish to establish groups, you must select each sorting level and decide:

a: Do you need a group for this field? and b: Do you need headers or footers for this group?

The second half of the Sorting and Grouping window allows you to determine how your groups will be set up. For group header, you will need this if you wish to place an identifier before each group begins. For example, if you want to show in the report that the following section is part of XY structure, you would select Yes under group header. For group footers, you would generally select Yes if you wanted to subtotal or count for that particular group.

TIP: If don’t need a subtotal or count for a group, but would like to see a break between groups,

add a group footer and leave it empty. It will add a few extra spaces to divide your groups

Text Fields, Labels, Summary Fields

Total fields in a report. When you wish to total a field, you must first create a report footer (if you have no group footers) Set up Report Header and Footer by selecting View/Report Header Footer.

(25)

CREATING A TOTAL FIELD

On your report design toolbar is a button that looks like a hammer and wrench. If it is not already depressed, click it now. That is your toolbox. In the toolbox are a series of buttons.

The button with

ab

| is the button for your text box. Click on that button, then draw your text box on your grid in the report footer section (or your group footer)

This will create a text box (containing the word Unbound) and a label. Delete the label. Right click on the text box. Select the properties option.

(26)

The properties of the text box will appear. Select the All tab. On the control source line, type the following:

= s u m ( [ p l e d g e ] ) - or whichever field you wish to sum.

Then tab to the next line (format), select Currency. Close the dialog box and you have a total field.

HEADINGS/LABELS

In order to create a heading for a field name, we will use the toolbox again. This time, we will use the button labeled

Aa.

Click the button, then draw a label in the page header or group header over the

(27)

Preview your report by selecting the Print Preview button. You can look over your report and see if it looks the way you intended.

If your report is not selecting the information you expected, you may have to return to your query and double check your information. A quick way to move from your report to the query is to move your cursor below your grid. Double click. A report properties window will appear. Next to data source will be the name of the query your report is using. Click to the right. Three dots will appear. Click on those dots and you will go to the data source (the query). Make your modifications and close. Save the query modifications (if necessary) and preview your report again.

INSERTING DATE AND PAGE NUMBER FIELDS

Insert Date: Click Insert/Date and Time. Make the selections for the format of the date. Select how and if you want the time to show. Then click OK.

For page number,Click Insert/Page Number. Make the selections for the format of the page and where you want it to appear. Then click OK.

ADD A LINE

Select the line button from your toolbox and click in the location where you want the line to BEGIN. Then, right click the line. Select properties, under Format (or All) change your Width to the length you prefer (this is helps to ensure the line is straight). If you would like to change the ‘boldness’ of the line, click on Border Width and select a higher point value.

(28)

‘STRINGING’ FIELDS

Also known as trimming. Frequently, you will want certain fields together without spaces. Some of the most common instances will be for prefix firstname lastname, or city state zip, or even primary structures. Create these fields by first creating a text box. Right click the textbox and select

properties. On the Control Source line, type the = (to begin your expression). Then type the name of the first field, then &, then the second field and another & , then the third field etc and so on. This will string the fields together and eliminate blank spaces all at the same time. If you want blank spaces between your fields, you must add them.

For example: =[prefix]&’ ‘&[firstname]&’ ‘&[lastname]

This reads as prefix and space and firstname and space and lastname

You can use this same method to link text to data fields. (As a matter of fact, the blank spaces in the example above are considered text.) Begin your expression with =, then type your text within quotes add an ampersand (&) then the field name.

=”Transactions for Campaign Year ”&[campaignyear]

TIP: Always use & for stringing fields. Some report programs require that you use +, but if you

use + in Access, if it encounters a null, it will not show any of the fields. For example, if Access

finds a Prefix and a Lastname but no Firstname, if you use & it will show the Prefix and Lastname.

(29)

Other tips and information:

UWCMS program staff have developed hundreds of queries and reports that are ready for you to use. You may want to change a query or report, but you would like to preserve the original. Copy queries or reports by simply selecting the report or query, clicking Copy, then clicking Paste. Name your report or query and make any modifications you like.

If you have a local database of reports (recommended) and would like to transfer a report into your local database, you can do that one of two ways. You can either select the query or report, select File/Save as Export. Locate the reports database you wish to save the report or query to, and click export. Or, open your local reports database, go to File/Get External Data/Import. Find the database you wish to get the report or query from, select it, select the reports and queries you want and click import. You must also bring any supporting queries. Contact UWCMS staff for assistance with identifying and transferring supporting queries.

PRIMARY QUERIES

Reports and queries are constantly being created as well as endlessly customized and modified. A report may have the same name at ten different United Ways, but the selections and layout may well be completely different at each location. It would be impossible to document the hundreds of reports and queries that exist. So we have tried to name them as descriptively as possible, but in order to know what is there, you simply must run them.

In the reports databases supplied by UWCMS, you will find a number of queries named as Primary. These queries exist to take the basic information from a particular table and screen them for deleted records and primary records. There are many primary queries to assist you with creating your own queries. Some of them include:

Primary_Address : Selects all undeleted address records. Selects the address specified as Primary. Renames some fields to avoid duplicate field name errors.

Primary Agency: Selects all undeleted agency records. Also renames some fields to avoid duplicate field name errors. (for example, Name1 is renamed AgencyName1)

Primary Billing: Selects all undeleted/Unposted billing records.

Primary Campaign: Selects all undeleted Campaign records. Also screens out Memo pledges. Primary Campaign with Memos: Selects all undeleted Campaign records but includes Memos and live records.

Primary Contacts: Contains all undeleted Contacts with contact name, role description and company, agency or person assignment.

Primary Employee: All undeleted employees. Contains all people who are linked to a company through their business tab. Also contains employee name, company name, company address and phone.

Primary Firms: Contains all undeleted organizations. Primary People: Contains all undeleted people

Primary People Address: with primary address, primary salutation, and structure information Primary People Emp: with primary address, primary salutation, employee information and employer. Primary Structure: Current year structure definitions with attached volunteer(s).

(30)

Primary Transaction: Contains all undeleted transaction information.

There are more primary queries as well as other standard queries. Since many are customized according to the needs of particular United Ways, review the contents of those queries when you begin to build your own reports. Other key queries include:

Account Campaign (there are many versions based on the specific reporting needs) These contain basic campaign account name, address and pledge information.

Account Name – Selects either person or organization name based on object type. Campaign Account – Account name and campaign information.

Designation detail – Contains all designation information including donor name and address, agency name, and employer name.

Mailmerge queries – Queries specifically created to assist you in creating mail merges in Word or Access. Mailmerge queries should have NO prompts as prompts interfere with merging to Word or Excel. When modifying a mailmerge query, do not add a prompt or add a query that requires one. Name and address queries

Transaction queries – Detail based on particular selection criteria Transaction summary – All transaction information totalled by account.

Many of these queries have related queries that will allow you to create reports based on particular criteria. The most basic selection criteria is campaign year. Most of the queries that utilize campaign or transaction data will ask for that information. Other basic selection criteria include structure, fact codes, batch number or transaction date.

(31)

TROUBLESHOOTING:

Records are duplicated: Duplication can happen for many reasons. The first thing you want to check is whether you have a more than one primary address or phone number for a particular

account. In the case of people, also check if they have more than one primary employer or salutation. For organizations, check to see if they have more than one of any particular type of corporate contact (CEO, Employee Chair, etc.). If you have no object duplications within the software, call UWCMS staff to assist you with tracking down the reason.

Records not appearing: For example, you have set up your query to select for all companies whether there is a campaign record or not. Yet, your report is only showing companies with a campaign record.

In your criteria, you specified a field that appears in the secondary table. The query is looking for that value and if it doesn’t find it, it’s not including it in your data. A null is not equal to the value you’re looking for, so you need to instruct the query to select for the field if it finds it and also select null values. So, for example, you would set your campaign year criteria to ‘2003’ or is null. This will select every campaign record for the year 2003, as well as where no campaign record exists at all. The same will be the case for any criteria set for a secondary table field.

Blank pages are printing: Your grid is too wide based on your margins and page layout. Move any fields that extend too far, then drag your grid to the left. If you are unable to move your fields, modify your margins in Page Setup.

You are trying to narrow the grid, but it won’t move. There is an object (most likely a line) that is in the way. Sometimes it is difficult to identify a line. One tip is to go to the upper ruler across the top of your report. Click on the ruler at the far right side of your grid. This should select anything within its path. You may, at this point, be able to see the line selected. You can drag the line in to shorten it. Deleted Records are appearing: Your query is not set up to select out your deleted records. Go to your query either in the query list or directly through the report (see instructions on page 17) and under DeleteCode criteria, type False. If the DeleteCode field is not one of your selected fields, go to the appropriate table, double click DeleteCode and specify False for criteria.

No address is appearing when one exists: The address may not be flagged as Primary. Check through the software to make sure that address is flagged correctly.

The Query or Report has an unexpected prompt For example, the query may ask for

contact_name or sortno. If there is an unanticipated prompt, in most cases it is looking for a field it cannot find. A supporting query calls for a field that is not there. If you retrace the queries, you may find a field that begins as Expr1: Often, that is the field that is in error. Check the field first to ensure it isn’t a calculation. If it is the source of the error, delete the column.

The Column Headings are wrong: If the column headings are wrong, or you simply would prefer they said something else (for example, a field may be identified as Pledge Audited, but you would like it to say Current Pledge) simply click twice (not double click) on the label and the label will ‘open’. Type in whatever you would like it to be.

You created a Column Heading (or Report Title), but the report is repeating it as a prompt when you try to run the report You entered the heading or title into a Text Box rather than a Label. Delete the text box, then click on Aa to create a label.

(32)

M

AIL

M

ERGE

:

One of the most basic functions you will need is the ability to do mail merges. Mail merges can be accomplished with relative ease using Access.

(The instructions for creating mail merges is for Microsoft Word)

We have provided a number of queries that are contained in your reports databases. There is a series of queries that begin with the words MailMerge. These are the queries that you will use for your merge documents. There are a number of MailMerge formats available. You can select for Individuals or Organization, select by structure, campaign total, or fact code. There is any number of possible mail merge combinations, depending on what your United Way requires at any point in time. Selecting Records

Many of the queries and reports contain prompts. These are the mechanism by which your reports and queries remain flexible and can eliminate the need for multiple reports that contain essentially the same information. With Mail Merges into Word, prompts are not recommended. This is the reason that you need to go into the design of the query and ‘hard code’ the information you need. For example, if you wanted to send a mailing to all of your Board members, you could select the query MailMerge_Individual_factcode. Go into the design, find the appropriate field (in this case, fact code) and, on the criteria line, type in the board fact code.

(33)

Go to Tools/Office Links/Merge it with MS Word.

You can either merge your query with an existing document or create a new one. In this case, select ‘Create a new document and then link the data to it’.

Word will then be opened with a blank merge form letter document.

Use the mail merge toolbar and select Insert Merge Field. Word will show a list of the fields from your query that are available. Select the fields and lay them out as you would like to see them in your document, including all spaces and punctuation. Then type the letter itself.

Mail Merge Tool Bar

(34)

From the mail merge toolbar, you can now merge your document. You can either Merge to Printer or Merge to New Document. If you merge to printer, your document will go directly to the printer. (You will not have the opportunity to look over your final results before committing it to paper) If you elect to Merge to New Document, the merged results will be available for your review and/or edit prior to printing.

Tip: If you want to do a quick preview as you are laying out your document, on the Mail Merge Toolbar, click the button that looks like:

<< >>

ABC

Labels

You can create labels using Microsoft Access or Microsoft Word. If you need simple, standard labels, you can use Access. If you want to create special, custom labels, Word might give you the additional flexibility you will need.

Mail Merge Tool Bar

(35)

CREATING LABELS IN MICROSOFT WORD (BEGINNING IN ACCESS)

Follow the same procedure as described on page 32 for modifying the query and Merging with MS Word (97 or 2000). When Word has opened the blank document, go to Tools/Mail Merge and select the button labeled Create.

A series of document types will list. Select Mailing Labels.

Select Change Document Type.

Then, back at the Mail Merge Helper, select the button labeled Setup. From here you will select your label type and printer information. Click OK and you will then have a window that will allow you to layout a single label, which will be replicated throughout the document in the format appropriate for the label type you selected.

Click OK, close the mail merge helper and you have a label shell that you can use whenever you need to.

(36)

SETTING UP MERGES IN WORD(BEGINNING IN WORD)

You can also attach a document for merging directly through Word. If you are already in Word, you can use the following steps to set up your merge.

You have a blank document and would like to set up the merge, go to Tools/Mail Merge and select Create. Select the type of document you wish to create.

(Word will ask you if you want to use the document that is already open or if you would like to create a new document. If the existing document is the one you want to merge or is blank, select Active Window. If you wish to start a whole new document, select New Main Document.)

Next you will select Get Data. In order to merge with an existing Access Query, select Open Data Source.

A browse window will open. Use the Look In line to find the path of your reports database. That is, what drive, and which folder(s) that your reports database is stored. At the bottom of the browse window, next to Files of Type select either All Files or MS Access Databases.

(37)

Select the reports database in which the reports are located. Click Open. A small window will appear that has a tab for Tables and a tab for Queries. Select Queries, then find the query you want to merge with. Select it. Your query has been selected, now it is time to add and format the merge information within your document. In the case of labels, after you have selected your query, Word will tell you that you need to Set Up your Main Document. Click the button Set Up Your Main Document and the label options window will appear. Enter the merge information.

In the case of Form Letters, a message will appear that a ‘Word found no merge fields in your main document. Choose edit main document button to insert merge fields into your main document’ A blank document will be shown with the Merge Tool Bar above. Layout the information as you would in an Access to Word merge earlier.

NOTE: It is recommended that you keep the label merge shells, giving them the same name as the query where they retrieve their data. For example, if you have merge labels that you created for mailings to your volunteers and you used Mailmerge Select by Fact Code, you might want to call your document LABEL-mailmerge select by fact code. This way, you will know which label to use for a task, and which query to modify in order to get the labels you need.

LABELS USING MICROSOFT ACCESS

One advantage to using Access for labels is the ability to use prompts. The labels can remain flexible because campaign year, structure, fact codes etc do not need to be selecting in the design of the query.

• Click On Reports • Click New

• Select Label Wizard Look In:

(38)

• Select the query that contains the data you wish to see on a label.

• Click OK

• Select the label type (or customize)

• Click Next

(39)

• Click Next

• Layout your label, including all spaces and punctuation

(40)

• Click Next • Name your labels.

NOTE: Give them a name that makes clearly identifies the selection criteria and available fields. This will make it easier for you to find them at a later date.

• Select whether you wish to view the labels as they will look printed (run the labels in Print Preview) or to modify the label design (go to design view of the ‘report’).

References

Related documents

$1000 and a complimentary letter to Mary Patten for her heroic work in bringing the fast sailing clipper ship safely around the dangerous Cape Horn?. When Mary and Captain

• For a home purchase loan, a refinancing, or a dwelling-secured home improvement loan that you originated, report the spread (difference) between the annual percentage rate

ter mean to the prototypes computed from the true labels of all the samples. Similar to the semi-supervised scenario, we use a PN trained in the episodic mode as the feature

• Storage node - node that runs Account, Container, and Object services • ring - a set of mappings of OpenStack Object Storage data to physical devices To increase reliability, you

Customer to pay any amount within ten (10) days after the amount is due and payable, b) abuse of the System or the equipment, c) dissolution, termination, discontinuance,

We also deal with the question whether the inferiority of the polluter pays principle in comparison to the cheapest cost avoider principle can be compensated

Although total labor earnings increase with the unskilled unions’ bargaining power, we can say nothing when the increase in production is due to stronger skilled unions, since

The unit I teach, the site of this research, involves students exercising self- determination in a collaborative, creative mode; a phenomenon Meill and Littleton (2004:18) describe