ACC: Lookup Wizard Error: "You Already Have a Field Named.." (175217)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q175217 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the Lookup Wizard to create a field that looks up or lists
values from a table, and the first field name in the lookup table has the
same field name as the Lookup field that you are creating, you may receive
the error
You already have a field named <'fieldname'>
if you click to select the Hide Key Column check box when you create the
field.
RESOLUTION
Make sure that the Hide Key Column check box is not selected when you see
the screen that asks "How wide would you like the columns in your lookup
column?"
To create a Lookup field, follow these steps:
- Start Microsoft Access and open the sample database Northwind.mdb.
- Create a new table in Design view, and add a text field named Field1.
Save the table as Table1, and click Yes when prompted if you want to
create a primary key now.
- Create a second table in Design view, and add a text field named ID.
- Add a second field named Test. In the Data Type column, click the
down arrow and select the LookUp Wizard.
- When the Lookup Wizard starts, select the default option "I want the
lookup column to look up the values in a table or query" and then
click Next.
- On the second screen of the Lookup Wizard, under "Which table or query
should provide the values for your lookup column?", select Table1, and
then click Next.
- On the third screen of the Lookup Wizard, move both fields under
Available Fields to the Selected Fields box by clicking the >> button,
and then click Next.
- On the fourth screen of the Lookup Wizard, which asks "How wide would
you like the columns in your lookup column?", make sure that the Hide
Key Column check box is not selected, and then click Next.
- On the fifth screen of the Lookup Wizard, select Field1 in the
Available Fields box, and then click Next.
- On the sixth screen of the Lookup Wizard, which asks "What label would
you like for your lookup column?", notice that the suggested label for
the lookup column is Test. Click Finish, and then click Yes to the
message that says that "The table must be saved before relationships
can be created. Save now?".
- In the Save As dialog box, click OK to save the table with the default
name Table2, and then click No when you see the message "There is no
primary key defined."
Note that the table is saved with the Lookup field without an error.
REFERENCES
For more information about the Lookup Wizard, search the Help Index for
"Lookup Wizard," or ask the Office Assistant.
Modification Type: | Major | Last Reviewed: | 10/28/2003 |
---|
Keywords: | kberrmsg kbprb KB175217 |
---|
|