Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link table losing primary key

Status
Not open for further replies.

craig322

MIS
Apr 19, 2001
108
US
I have a problem with linked tables. I have no problem creating them with a primary key so that the tables are updatable. We have login restrictions to the database that forces me to change my password every 90 days. When I change the password (because I have my password set in the odbc connection) I must relink the tables. When I relink the tables, I lose the primary key. This only happens when I choose a primary key when linking the table, not for an access defaulted primary key.

Does anyone know how I can either prevent this from happening or how I can readd a key without dropping and recreating the link.

TIA
 
I'm not sure why you are losing the primary key. If the table has a primary key then Access should be able to identify it.

You can create an run data-definition queries to create virtual primary keys. The SQL would look something like (I think):

CREATE UNIQUE INDEX PrimaryKey ON tblYourTable (fieldname)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top