Question Locked

Access & PostgreSQL Question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Where I work we have a database to track what our employees do each day. The database was originally created in MS Access but grew too large and unwieldy for Access, so we migrated it to a PostgreSQL database server and continued using Access as a front-end, due to its ease of use and familiarity for management.

Recently I was asked to add a field to the table that tracks the individual tasks and now Access is reporting this new field as the primary key, which has resulted in any lookups to change entries that contain errors pulling up the same record from five years ago, and taking several minutes to do that even. I have tried removing and relinking the table, as well as creating a totally new database and linking the table there, with the result always being the incorrect field linked as the primary key.

My question is: is there a way to force Access to either use the correct field as the primary key or force it to ask which field to use as the primary key? Alternately, is there another application other than Access that would be as easy to use that would communicate better with PostgreSQL, as well as be available for free (corporate doesn't like to give us any money for software, or we'd be running MS SQL Server)?

3 replies

by coderancher

You can select the primary key by opening the table in question and selecting Design View from the toolbar or the View menu. Right-click on the field that you want to change and select/deselect Primary Key from the popup menu. I hope this helps.

by brian.mills

That works great for tables that are actually in the Access database, but for linked tables the changes won't save. I've tried changing the primary key for linked tables before and it reverts when I close the design view.

Fortunately for me, we've abandoned the project that would have added the new fields to the table because we ended up breaking the entire database trying to do it. So now everything is working fine again and the tables have the proper primary keys.

This discussion is closed to new replies.