Solved

Making the result set of a query involving more than one table updateable

Posted on 2013-01-29
7
311 Views
Last Modified: 2013-01-29
I have joined two tables in a query on the first name and last name  (see attachment) . I plan to include this query in a form that will allow me to view the entries and make changes to them where applicable. The problem I am facing is that the result set from the query is not updateable. It only allows me to view the entries but not edit them. How can I remedy this situation?
Edit-Query-Results.jpg
0
Comment
Question by:geeta_m9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 38831630
To make that query updateable, you should be storing the Primary Key from the Applications table in the Statements table, and using that key field as the link between the two tables.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
ID: 38831636
Try this...

Add a primary key to the Statements table.  (ID)
Include both primary keys in the query output.

See if that gives you an updateable result.
0
 

Author Comment

by:geeta_m9
ID: 38831652
The primary key in both the tables is a combination of the first name and last name. You mean to say I have to have a single field as the primary key, and cannot use a combination of two fields?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:geeta_m9
ID: 38831662
I guess it is my fault...I did not specify it that way in the table design.
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 250 total points
ID: 38831665
From your image, it looks like you have the ID field in the Applications table set as the primary key...  My suggestion was to add that as a foreign key to your other table and link on the ID instead of the two name fields (which you could then remove from the statements table).


Anyhow, try Pete's suggestion first.
0
 

Author Comment

by:geeta_m9
ID: 38831755
If I made the primary key a combination of the first name and last name like so (see attached), it seems to work. The ID was just an autonumber created by Access which I did not use. I already have hundreds of records in each of the tables and don't feel like going in and assigning the matching ID from the Applications table to each of the records in the other two tables. Next time, though I will use a valid ID field as it will save me a lot of trouble that way.
Combination-Primary-Key.jpg
0
 

Author Closing Comment

by:geeta_m9
ID: 38831775
Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question