Microsoft KB Archive/287494

= ACC2002: When You Paste Table Structure in ADP, Extended Properties Are Not Included in New Table =

Article ID: 287494

Article Last Modified on 11/6/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q287494



Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
When you copy and paste a table in a Microsoft Access project, the new table does not include extended properties from the original table.



RESOLUTION
To work around this issue, copy the properties from the table's Design view.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The design of a table in an Access project includes, for every column, the following properties:
 * Column Name, which identifies the column
 * Data Type, which specifies the type of data to be stored in the column, such as integer or character
 * Length, which specifies the maximum size of a data item in that column, such as 4 digits for integer or 50 characters for character data
 * Allow Nulls, which specifies whether or not the table will permit records to be saved that have no data (NULL) in that column

In addition to these basic properties, each column can have a variety of extended properties, which depend on the type of data being stored. The extended properties are grouped as Columns properties and Lookup properties. Columns properties affect the way in which the data is stored and presented, and Lookup properties affect the way in which the data is obtained.

The Columns properties include the following:
 * Default Value
 * Precision
 * Scale
 * Identity
 * Identity Seed
 * Identity Increment
 * Is RowGuid
 * Formula
 * Collation
 * Format
 * Decimal Places
 * Input Mask

However, not all Columns properties apply to all columns. For example, Decimal Places is not a relevant property in a column that stores character data.

The Lookup properties include the following:
 * Display Control
 * Row Source Type
 * Row Source
 * Bound Column
 * Column Count
 * Column Heads
 * Column Widths
 * List Rows
 * List Width
 * Limit To List

Lookup properties are primarily used to determine the characteristics of a list that allows the user to select rather than type data to be entered in the column.

When you use the Copy and Paste commands to duplicate a table in the Database window of an Access database, the extended properties of the table's fields (that is, Columns and Lookup properties) are copied along with the rest of the structure. The extended properties are not copied in this way in an Access project, but you are able to duplicate them by copying from the table's Design view.

To do this, follow these steps after you perform the steps in the &quot;Steps to Reproduce the Problem&quot; section of this article:
 * 1) Open the table TestCustOrders in Design view.
 * 2) Drag to select the three rows containing the column definitions, and then click Copy on the toolbar.
 * 3) Minimize the TestCustOrders window, and then click New in the Project window.
 * 4) In the new table's Design view, click the first row header, and then click Paste on the toolbar.
 * 5) Click the individual rows and notice that their extended properties have been copied.

NOTE: Although the extended properties of the table can be copied in this way, the Primary Key property cannot be. It is necessary for you to manually select the Primary Key (in this case, the column OrdID).

Steps to Reproduce the Problem
 Start Access, and then open any project (*.adp). In the Database window, click Tables under Objects, and then click New.  Create columns with the following properties:   Column Name       Data Type            Length     Allow Nulls ---      -            --     ---   OrdID             uniqueidentifier       16           No   CustID            char                   50           No   Value             money                   8           Yes  Click the OrdID row, and then click Primary Key on the toolbar.  Click the CustID row, and then type the following properties on the extended properties Lookup tab: <pre class="fixed_text">  Display Control           Combo Box Row Source Type          Tables/Views/Functions Row Source               SELECT CustomerID FROM Customers </li>  Click the Value row, and then type the following property on the extended properties Columns tab: <pre class="fixed_text">  Default value             100 </li> On the File menu, click Save, and then type the name TestCustOrders .</li> Open the table in Datasheet view, enter three rows of data of your choice, and then close the table.</li> In the Database window, right-click the TestCustOrders table, click Copy on the shortcut menu, right-click the Project window, and then click Paste on the shortcut menu.</li> In the Paste Table As dialog box, type the table name TestCustOrdersBU, and then click OK.</li> Open TestCustOrdersBU in Design view, and then notice that the extended properties have not been copied.</li></ol>

Additional query words: prb

Keywords: kbbug kbnofix KB287494

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.