Robert L. Stewart
robert at webedb.com
Wed Mar 12 12:50:25 CDT 2008
John, Create a table from the zip table that only has the "primary" in it. Robert At 12:09 PM 3/12/2008, you wrote: >Date: Wed, 12 Mar 2008 09:52:07 -0400 >From: "jwcolby" <jwcolby at colbyconsulting.com> >Subject: [AccessD] Query becomes uneditable >To: "'Access Developers discussion and problem solving'" > <accessd at databaseadvisors.com> >Message-ID: <001d01c88448$43330cf0$0201a8c0 at M90> >Content-Type: text/plain; charset="us-ascii" > >I have a fairly simple query, with a people table, with outer joins to >tlkpState on stateID etc. It is editable as it sits. > >I need to provide a county population of the county for the zip code in the >address. I have a table of zip code information which includes this >information, however the zip codes are not unique, i.e. there are >potentially multiple rows for a given zip, for reasons like the name of >suburbs inside of a "town" etc. Because the zips are not unique, the table >has a "primary" field which holds a "P" in the field for the "primary" zip >record. Don't look at me like that, I did not do this!!! This table does >not have a PK of any kind, probably because it would be extremely difficult >to discover a natural key, and an autonumber is less than useful anyway. To >make matters worse, we get an update to this table periodically. > >I have a query that pulls a single record per zip based on a "P"rimary field >which holds that "P" in that field for exactly one record for each zip. If >I join that query to my updateable query on the zip, my query becomes >non-updateable. If I join the table itself on the zip all hell breaks loose >as you might imagine. > >Is there an answer to my quandary? Is there a way to get a zip / county >name out of this table, joined to my query while still having the query >updateable? The county field should not be updateable anyway. > >I think I could just put a subform in that displays the county but I am just >wondering if there is a "cleaner" way. > >John W. Colby >Colby Consulting >www.ColbyConsulting.com